]> source.dussan.org Git - aspectj.git/commitdiff
support shift-key to rebuild-all in incremental mode
authorwisberg <wisberg>
Wed, 30 Apr 2003 02:32:39 +0000 (02:32 +0000)
committerwisberg <wisberg>
Wed, 30 Apr 2003 02:32:39 +0000 (02:32 +0000)
ajbrowser/src/org/aspectj/tools/ajbrowser/TopFrame.java
ajde/src/org/aspectj/ajde/ui/swing/BuildConfigPopupMenu.java

index 2b7b66ebfe68093dc717cba91bec2a4b9e7f4901..d8bf0416b69f02b7fdbddeee68006baee287eb62 100644 (file)
@@ -43,6 +43,7 @@ import javax.swing.border.Border;
 import javax.swing.filechooser.FileFilter;
 
 import org.aspectj.ajde.Ajde;
+import org.aspectj.ajde.ui.EditorManager;
 import org.aspectj.ajde.ui.swing.AJButtonMenuCombo;
 import org.aspectj.ajde.ui.swing.AjdeUIManager;
 import org.aspectj.ajde.ui.swing.BuildConfigPopupMenu;
@@ -203,7 +204,11 @@ public class TopFrame extends JFrame {
             public void keyPressed(KeyEvent e) {
                 if (e.getModifiers() == java.awt.Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) {
                     if (e.getKeyCode() == KeyEvent.VK_F11) {
-                        Ajde.getDefault().getBuildManager().build();
+                        if (e.isShiftDown()) {
+                            Ajde.getDefault().getBuildManager().buildFresh();
+                        } else {
+                            Ajde.getDefault().getBuildManager().build();
+                        }
                     } else if (e.getKeyCode() == KeyEvent.VK_S) {
                         Ajde.getDefault().getEditorManager().saveContents();
                     } else if (e.getKeyCode() == KeyEvent.VK_P) {
@@ -466,7 +471,11 @@ public class TopFrame extends JFrame {
 
     void projectBuild_menuItem_actionPerformed(ActionEvent e) {
         BrowserManager.getDefault().saveAll();
-        Ajde.getDefault().getBuildManager().build();
+        if (EditorManager.isShiftDown(e.getModifiers())) {
+            Ajde.getDefault().getBuildManager().buildFresh();
+        } else {
+            Ajde.getDefault().getBuildManager().build();
+        }
     }
 
     void run_button_actionPerformed(ActionEvent e) {
@@ -479,7 +488,11 @@ public class TopFrame extends JFrame {
 
     void build_button_actionPerformed(ActionEvent e) {
         BrowserManager.getDefault().saveAll();
-        Ajde.getDefault().getBuildManager().build();
+        if (EditorManager.isShiftDown(e.getModifiers())) {
+            Ajde.getDefault().getBuildManager().buildFresh();
+        } else {
+            Ajde.getDefault().getBuildManager().build();
+        }
        }
 
     void options_button_actionPerformed(ActionEvent e) {
index 67323ea7c5930e0e19713bcecf03cc4deed6a00e..97904a5dc7831992724f8f72acdd94f84794dd43 100644 (file)
@@ -24,6 +24,7 @@ import javax.swing.JMenuItem;
 import javax.swing.JPopupMenu;
 
 import org.aspectj.ajde.Ajde;
+import org.aspectj.ajde.ui.EditorManager;
 import org.aspectj.asm.ProgramElementNode;
 
 public class BuildConfigPopupMenu extends JPopupMenu {
@@ -38,7 +39,11 @@ public class BuildConfigPopupMenu extends JPopupMenu {
                        new ActionListener() {
                                public void actionPerformed(ActionEvent e) {
                                        Ajde.getDefault().getConfigurationManager().setActiveConfigFile(buildConfig);
-                                       Ajde.getDefault().getBuildManager().build();
+                        if (EditorManager.isShiftDown(e.getModifiers())) {
+                            Ajde.getDefault().getBuildManager().buildFresh();
+                        } else {
+                            Ajde.getDefault().getBuildManager().build();
+                        }
                                        action.actionPerformed(e);
                                        }
                        });