Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
Bas Leijdekkers
2012-01-24 14:42:11 +01:00
47 changed files with 988 additions and 36 deletions
@@ -602,12 +602,17 @@ public class JavaCompletionData extends JavaAwareCompletionData{
LookupElement br = createKeyword(position, PsiKeyword.BREAK);
LookupElement cont = createKeyword(position, PsiKeyword.CONTINUE);
if (!psiElement().insideSequence(true, psiElement(PsiLabeledStatement.class),
or(psiElement(PsiFile.class), psiElement(PsiMethod.class),
psiElement(PsiClassInitializer.class))).accepts(position)) {
br = TailTypeDecorator.withTail(br, TailType.SEMICOLON);
cont = TailTypeDecorator.withTail(cont, TailType.SEMICOLON);
TailType tailType;
if (psiElement().insideSequence(true, psiElement(PsiLabeledStatement.class),
or(psiElement(PsiFile.class), psiElement(PsiMethod.class),
psiElement(PsiClassInitializer.class))).accepts(position)) {
tailType = TailType.HUMBLE_SPACE;
}
else {
tailType = TailType.SEMICOLON;
}
br = TailTypeDecorator.withTail(br, tailType);
cont = TailTypeDecorator.withTail(cont, tailType);
if (loop != null && new InsideElementFilter(new ClassFilter(PsiStatement.class)).isAcceptable(position, loop)) {
result.addElement(br);
@@ -175,6 +175,7 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField
protected boolean performRefactoring() {
JavaRefactoringSettings.getInstance().INTRODUCE_CONSTANT_MOVE_TO_ANOTHER_CLASS = myMoveToAnotherClassCb.isSelected();
if (myMoveToAnotherClassCb.isSelected()) {
myEditor.putUserData(INTRODUCE_RESTART, true);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
@@ -190,7 +191,15 @@ public class InplaceIntroduceConstantPopup extends AbstractInplaceIntroduceField
}
}
finally {
myEditor.putUserData(INTRODUCE_RESTART, false);
myEditor.putUserData(ACTIVE_INTRODUCE, null);
releaseResources();
if (myLocalMarker != null) {
myLocalMarker.dispose();
}
if (myExprMarker != null) {
myExprMarker.dispose();
}
}
}
});
@@ -0,0 +1,7 @@
public class Util {
void foo(int a, int b) {
Outer: for (int i = 0; i < 239; i++) {
conti<caret>
}
}
}
@@ -0,0 +1,7 @@
public class Util {
void foo(int a, int b) {
Outer: for (int i = 0; i < 239; i++) {
continue <caret>
}
}
}
@@ -520,6 +520,8 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
checkResult()
}
public void testContinueLabel() throws Throwable { doTest(); }
public void testAnonymousProcess() {
myFixture.addClass 'package java.lang; public class Process {}'
myFixture.addClass '''
@@ -826,7 +826,9 @@ public class Mappings {
if (it.isAnnotation() && it.policy == RetentionPolicy.SOURCE) {
debug("Annotation, retention policy = SOURCE => a switch to non-incremental mode requested");
return incrementalDecision(it.outerClassName, it, affectedFiles);
if (!incrementalDecision(it.outerClassName, it, affectedFiles)) {
return false;
}
}
if ((addedModifiers & Opcodes.ACC_PROTECTED) > 0) {
@@ -866,7 +868,9 @@ public class Mappings {
if (removedtargets.contains(ElementType.LOCAL_VARIABLE)) {
debug("Annotation, removed target contains LOCAL_VARIABLE => a switch to non-incremental mode requested");
return incrementalDecision(it.outerClassName, it, affectedFiles);
if (!incrementalDecision(it.outerClassName, it, affectedFiles)) {
return false;
}
}
if (!removedtargets.isEmpty()) {
@@ -1218,7 +1222,9 @@ public class Mappings {
if ((f.access & Opcodes.ACC_PRIVATE) == 0 && (f.access & mask) == mask && f.hasValue()) {
debug("Field had value and was (non-private) final static => a switch to non-incremental mode requested");
return incrementalDecision(it.name, f, affectedFiles);
if (!incrementalDecision(it.name, f, affectedFiles)) {
return false;
}
}
final Collection<DependencyContext.S> propagated = u.propagateFieldAccess(f.name, it.name);
@@ -1237,7 +1243,9 @@ public class Mappings {
if ((field.access & Opcodes.ACC_PRIVATE) == 0 && (field.access & mask) == mask) {
if ((d.base() & Difference.ACCESS) > 0 || (d.base() & Difference.VALUE) > 0) {
debug("Inline field changed it's access or value => a switch to non-incremental mode requested");
return incrementalDecision(it.name, field, affectedFiles);
if (!incrementalDecision(it.name, field, affectedFiles)){
return false;
}
}
}
@@ -0,0 +1,24 @@
Request to make modules:
module nonIncremental1
End of request
digraph X {
nonIncremental1[label="nonIncremental1"];
}
digraph X {
nonIncremental1[label="nonIncremental1"];
}
Propagated modules:
module nonIncremental1
End of propagated
Cleaning output files:
out/production/nonIncremental1/A/A.class
End of files
Compiling files:
src/A/A.java
End of files
Cleaning output files:
out/production/nonIncremental1/A/C.class
End of files
Compiling files:
src/A/C.java
End of files
@@ -0,0 +1 @@
nonIncremental1
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
<entry name="?*.html" />
<entry name="?*.dtd" />
<entry name="?*.tld" />
<entry name="?*.ftl" />
</wildcardResourcePatterns>
<annotationProcessing enabled="false" useClasspath="true" />
</component>
</project>
@@ -0,0 +1,5 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright />
</settings>
</component>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.6</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/nonIncremental1.iml" filepath="$PROJECT_DIR$/nonIncremental1.iml" />
</modules>
</component>
</project>
@@ -0,0 +1,5 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
</component>
</project>
@@ -0,0 +1,449 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="71d729ce-aec8-4057-a3f5-ef20851cc07e" name="Default" comment="" />
<ignored path="nonIncremental1.iws" />
<ignored path=".idea/workspace.xml" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="DaemonCodeAnalyzer">
<disable_hints />
</component>
<component name="DebuggerManager">
<breakpoint_any>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
<breakpoint>
<option name="NOTIFY_CAUGHT" value="true" />
<option name="NOTIFY_UNCAUGHT" value="true" />
<option name="ENABLED" value="false" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
</breakpoint_any>
<breakpoint_rules />
<ui_properties />
</component>
<component name="FavoritesManager">
<favorites_list name="nonIncremental1" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="A.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/A/A.java">
<provider selected="true" editor-type-id="text-editor">
<state line="10" column="30" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="C.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/A/C.java">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="19" selection-start="217" selection-end="217" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="M.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/B/M.java">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="26" selection-start="215" selection-end="215" vertical-scroll-proportion="0.2241594">
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/src/A/A.java" />
<option value="$PROJECT_DIR$/src/A/C.java" />
<option value="$PROJECT_DIR$/src/B/M.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-1" />
<option name="y" value="25" />
<option name="width" value="1282" />
<option name="height" value="979" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectReloadState">
<option name="STATE" value="0" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
</navigator>
<panes>
<pane id="PackagesPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="B" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="nonIncremental1" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="A" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="GoToFile.includeJavaFiles" value="false" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<property name="GoToClass.includeLibraries" value="false" />
<property name="MemberChooser.copyJavadoc" value="false" />
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="" />
</key>
</component>
<component name="RunManager">
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
<module name="" />
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
<option name="PROGRAM_PARAMETERS" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Applet" factoryName="Applet">
<module name="" />
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<method>
<option name="AntTarget" enabled="false" />
<option name="BuildArtifacts" enabled="false" />
<option name="Make" enabled="true" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<list size="0" />
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="71d729ce-aec8-4057-a3f5-ef20851cc07e" name="Default" comment="" />
<created>1327315772338</created>
<updated>1327315772338</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-1" y="25" width="1282" height="979" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24918832" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="CHECK_NEW_TODO" value="true" />
<option name="myTodoPanelSettings">
<value>
<are-packages-shown value="false" />
<are-modules-shown value="false" />
<flatten-packages value="false" />
<is-autoscroll-to-source value="false" />
</value>
</option>
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
<option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
<option name="SHORT_DIFF_HORISONTALLY" value="true" />
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
<option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="LAST_COMMIT_MESSAGE" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
<option name="ACTIVE_VCS_NAME" />
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/A/A.java">
<provider selected="true" editor-type-id="text-editor">
<state line="10" column="30" selection-start="206" selection-end="206" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/A/C.java">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="19" selection-start="217" selection-end="217" vertical-scroll-proportion="0.0" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/B/M.java">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="26" selection-start="215" selection-end="215" vertical-scroll-proportion="0.2241594" />
</provider>
</entry>
</component>
</project>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
final static int x = 1025;
}
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
final static int x = 1024;
}
@@ -0,0 +1,14 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class C {
public int get(){
return A.x;
}
}
@@ -0,0 +1,14 @@
package B;
import A.C;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:52
* To change this template use File | Settings | File Templates.
*/
public class M {
int y = new C().get();
}
@@ -0,0 +1,26 @@
Request to make modules:
module NonIncremental2
End of request
digraph X {
NonIncremental2[label="NonIncremental2"];
}
digraph X {
NonIncremental2[label="NonIncremental2"];
}
Propagated modules:
module NonIncremental2
End of propagated
Cleaning output files:
out/production/NonIncremental2/A/A.class
End of files
Compiling files:
src/A/A.java
End of files
Cleaning output files:
out/production/NonIncremental2/A/C.class
out/production/NonIncremental2/B/M.class
End of files
Compiling files:
src/A/C.java
src/B/M.java
End of files
@@ -0,0 +1 @@
nonIncremental2
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
protected final static int x = 1025;
}
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
protected final static int x = 1024;
}
@@ -0,0 +1,14 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class C {
public int get(){
return A.x;
}
}
@@ -0,0 +1,13 @@
package B;
import A.C;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:52
* To change this template use File | Settings | File Templates.
*/
public class M extends A.A {
int y = A.A.x;
}
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
final static int x = 1025;
}
@@ -0,0 +1,12 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class A {
final static int x = 1024;
}
@@ -0,0 +1,14 @@
package A;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:51
* To change this template use File | Settings | File Templates.
*/
public class C {
public int get(){
return A.x;
}
}
@@ -0,0 +1,14 @@
package B;
import A.C;
/**
* Created by IntelliJ IDEA.
* User: db
* Date: 23.01.12
* Time: 13:52
* To change this template use File | Settings | File Templates.
*/
public class M {
int y = new C().get();
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
</project>
@@ -0,0 +1 @@
addMethod
@@ -42,7 +42,7 @@ public class ImplementationSearcher {
boolean onRef = ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
@Override
public Boolean compute() {
return targetElementUtil.findTargetElement(editor, getFlags() & ~TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED, offset) == null;
return targetElementUtil.findTargetElement(editor, getFlags() & ~(TargetElementUtilBase.REFERENCED_ELEMENT_ACCEPTED | TargetElementUtilBase.LOOKUP_ITEM_ACCEPTED), offset) == null;
}
});
return searchImplementations(element, offset, onRef && ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
@@ -19,11 +19,8 @@ package com.intellij.codeInsight.navigation.actions;
import com.intellij.codeInsight.CodeInsightActionHandler;
import com.intellij.codeInsight.actions.BaseCodeInsightAction;
import com.intellij.codeInsight.navigation.GotoImplementationHandler;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.psi.PsiFile;
import com.intellij.openapi.project.DumbAware;
import com.intellij.psi.search.searches.DefinitionsSearch;
public class GotoImplementationAction extends BaseCodeInsightAction implements DumbAware {
@@ -31,6 +28,10 @@ public class GotoImplementationAction extends BaseCodeInsightAction implements D
return new GotoImplementationHandler();
}
protected boolean isValidForLookup() {
return true;
}
public void update(final AnActionEvent event) {
if (!DefinitionsSearch.INSTANCE.hasAnyExecutors()) {
event.getPresentation().setVisible(false);
@@ -141,6 +141,7 @@ public abstract class PsiAnchor {
private final VirtualFile myVirtualFile;
private final Project myProject;
private final Language myLanguage;
private final Language myFileLanguage;
private final int myStartOffset;
private final int myEndOffset;
private final Class myClass;
@@ -157,6 +158,7 @@ public abstract class PsiAnchor {
myEndOffset = endOffset;
myClass = aClass;
myLanguage = language;
myFileLanguage = file.getLanguage();
}
@Override
@@ -178,8 +180,9 @@ public abstract class PsiAnchor {
}
@Override
@Nullable
public PsiFile getFile() {
return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject);
return SelfElementInfo.restoreFileFromVirtual(myVirtualFile, myProject, myLanguage);
}
@Override
@@ -213,9 +213,13 @@ public class SelfElementInfo implements SmartPointerElementInfo {
@Nullable
public static PsiFile restoreFileFromVirtual(final VirtualFile virtualFile, @NotNull final Project project) {
return restoreFileFromVirtual(virtualFile, project, null);
}
@Nullable
public static PsiFile restoreFileFromVirtual(final VirtualFile virtualFile, @NotNull final Project project, @Nullable final Language language) {
if (virtualFile == null) return null;
return ApplicationManager.getApplication().runReadAction(new Computable<PsiFile>() {
return ApplicationManager.getApplication().runReadAction(new NullableComputable<PsiFile>() {
@Override
public PsiFile compute() {
VirtualFile child;
@@ -230,7 +234,10 @@ public class SelfElementInfo implements SmartPointerElementInfo {
}
if (child == null || !child.isValid()) return null;
PsiFile file = PsiManager.getInstance(project).findFile(child);
if (file == null || !file.isValid()) return null;
if (file != null && language != null) {
return file.getViewProvider().getPsi(language);
}
return file;
}
});
@@ -212,8 +212,7 @@ public abstract class InplaceVariableIntroducer<E extends PsiElement> extends In
}
protected void releaseIfNotRestart() {
final Boolean isRestart = myEditor.getUserData(INTRODUCE_RESTART);
if (isRestart == null || !isRestart.booleanValue()) {
if (!isRestart()) {
releaseResources();
}
}
@@ -222,8 +221,7 @@ public abstract class InplaceVariableIntroducer<E extends PsiElement> extends In
public void finish(boolean success) {
super.finish(success);
if (myBalloon != null) {
final Boolean isRestart = myEditor.getUserData(INTRODUCE_RESTART);
if (isRestart == null || !isRestart.booleanValue()) {
if (!isRestart()) {
myBalloon.hide();
}
}
@@ -171,13 +171,13 @@ public abstract class TreeElementPattern<ParentType, T extends ParentType, Self
* @return Ensures that first elements in hierarchy accepted by patterns appear in specified order
*/
public Self insideSequence(final boolean strict, @NotNull final ElementPattern<? extends ParentType>... patterns) {
return with(new PatternCondition<T>("condInside") {
return with(new PatternCondition<T>("insideSequence") {
public boolean accepts(@NotNull final T t, final ProcessingContext context) {
int i = 0;
ParentType element = strict ? getParent(t) : t;
while (element != null && i >= patterns.length) {
while (element != null && i < patterns.length) {
for (int j = i; j < patterns.length; j++) {
if (patterns[j].getCondition().accepts(t, context)) {
if (patterns[j].accepts(element, context)) {
if (i != j) return false;
i++;
break;
@@ -185,7 +185,7 @@ public abstract class TreeElementPattern<ParentType, T extends ParentType, Self
}
element = getParent(element);
}
return false;
return true;
}
});
}
@@ -243,6 +243,10 @@ public abstract class AbstractVcs<ComList extends CommittedChangeList> extends S
return true;
}
public boolean needsLastUnchangedContent() {
return false;
}
public static boolean fileInVcsByFileStatus(final Project project, final FilePath path) {
final VirtualFile virtualFile = path.getVirtualFile();
if (virtualFile != null) {
@@ -450,7 +450,9 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
});
for (VcsDirtyScope scope : scopes) {
updateLastUnchangedContents(scope);
if (scope.getVcs().needsLastUnchangedContent()) {
updateLastUnchangedContents(scope);
}
}
myChangesViewManager.scheduleRefresh();
@@ -644,7 +646,7 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
for (VcsDirectoryMapping mapping : vcsManager.getDirectoryMappings()) {
final AbstractVcs vcs = vcsManager.findVcsByName(mapping.getVcs());
final VirtualFile file = LocalFileSystem.getInstance().findFileByPath(mapping.getDirectory());
if (vcs != null && file != null) {
if (vcs != null && file != null && vcs.needsLastUnchangedContent()) {
if (indicator != null) {
indicator.setText(mapping.getDirectory());
}
@@ -36,7 +36,7 @@ public class LastUnchangedContentTracker {
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.LastUnchangedContentTracker");
private static final Key<Long> LAST_TS_KEY = Key.create("LAST_TS_KEY");
private static final FileAttribute LAST_TS_ATTR = new FileAttribute("LAST_TS_ATTR", 0, true);
private static final FileAttribute ACQUIRED_CONTENT_ATTR = new FileAttribute("ACQUIRED_CONTENT_ATTR", 0, false);
private static final FileAttribute ACQUIRED_CONTENT_ATTR = new FileAttribute("ACQUIRED_CONTENT_ATTR", 1, true);
public static void updateLastUnchangedContent(@NotNull VirtualFile file) {
Long lastTs = getLastSavedStamp(file);
@@ -100,7 +100,7 @@ public class MavenBeforeRunTasksProvider extends BeforeRunTaskProvider<MavenBefo
public boolean executeTask(final DataContext context, RunConfiguration configuration, final MavenBeforeRunTask task) {
final Semaphore targetDone = new Semaphore();
final boolean[] result = new boolean[1];
final boolean[] result = new boolean[]{true};
try {
ApplicationManager.getApplication().invokeAndWait(new Runnable() {
public void run() {
@@ -474,7 +474,13 @@ public class MavenUtil {
return home;
}
}
else if (SystemInfo.isLinux) {
File home = new File("/usr/share/maven2");
if (isValidMavenHome(home)) {
return home;
}
}
return null;
}
@@ -25,11 +25,14 @@ import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.Conditions;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.util.ArrayUtil;
import com.intellij.util.SystemProperties;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.HashMap;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
import com.intellij.util.xmlb.XmlSerializer;
@@ -201,7 +204,7 @@ public class BrowsersConfiguration implements PersistentStateComponent<Element>
BrowserUtil.launchBrowser(url);
}
else {
getInstance().doLaunchBrowser(family, url, ArrayUtil.EMPTY_STRING_ARRAY, false);
getInstance().doLaunchBrowser(family, url, ArrayUtil.EMPTY_STRING_ARRAY, Conditions.<String>alwaysTrue(), false);
}
}
@@ -221,12 +224,22 @@ public class BrowsersConfiguration implements PersistentStateComponent<Element>
@NotNull final String url,
final boolean forceOpenNewInstanceOnMac,
String... parameters) {
getInstance().doLaunchBrowser(family, url, parameters, forceOpenNewInstanceOnMac);
launchBrowser(family, url, forceOpenNewInstanceOnMac, Conditions.<String>alwaysTrue(), parameters);
}
public static void launchBrowser(final @NotNull BrowserFamily family,
@NotNull final String url,
final boolean forceOpenNewInstanceOnMac,
final Condition<String> browserSpecificParametersFilter,
String... parameters) {
getInstance().doLaunchBrowser(family, url, parameters, browserSpecificParametersFilter, forceOpenNewInstanceOnMac);
}
private void doLaunchBrowser(final BrowserFamily family,
@NotNull String url,
@NotNull String[] additionalParameters, final boolean forceOpenNewInstanceOnMac) {
@NotNull String[] additionalParameters,
@NotNull Condition<String> browserSpecificParametersFilter,
final boolean forceOpenNewInstanceOnMac) {
final WebBrowserSettings settings = getBrowserSettings(family);
final String path = settings.getPath();
if (path != null && path.length() > 0) {
@@ -234,7 +247,8 @@ public class BrowsersConfiguration implements PersistentStateComponent<Element>
try {
final BrowserSpecificSettings specificSettings = settings.getBrowserSpecificSettings();
final String[] browserParameters = specificSettings != null ? specificSettings.getAdditionalParameters() : ArrayUtil.EMPTY_STRING_ARRAY;
String[] parameters = ArrayUtil.mergeArrays(browserParameters, additionalParameters);
String[] parameters = ArrayUtil.mergeArrays(ContainerUtil.findAllAsArray(browserParameters, browserSpecificParametersFilter),
additionalParameters);
launchBrowser(path, url, forceOpenNewInstanceOnMac, parameters);
}
catch (IOException e) {
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
* @author nik
*/
public class ChromeSettings extends BrowserSpecificSettings {
@NonNls public static final String REMOTE_SHELL_PORT_ARG = "--remote-shell-port=";
@NonNls public static final String REMOTE_DEBUGGING_PORT_ARG = "--remote-debugging-port=";
@NonNls public static final String USER_DATA_DIR_ARG = "--user-data-dir=";
public static final int DEFAULT_REMOTE_SHELL_PORT = 7930;
private String myUserDataDirectoryPath;
@@ -88,7 +88,7 @@ public class ChromeSettings extends BrowserSpecificSettings {
String[] remoteShellArg;
if (myEnableRemoteDebug) {
remoteShellArg = new String[]{REMOTE_SHELL_PORT_ARG + myRemoteShellPort};
remoteShellArg = new String[]{REMOTE_DEBUGGING_PORT_ARG + myRemoteShellPort};
}
else {
remoteShellArg = ArrayUtil.EMPTY_STRING_ARRAY;