Merge remote-tracking branch 'origin/master'

This commit is contained in:
Alexander Lobas
2012-04-09 21:21:38 +04:00
69 changed files with 2636 additions and 445 deletions
@@ -174,27 +174,21 @@
<clientProperties>
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithoutIndent"/>
</clientProperties>
<border type="etched" title-resource-bundle="messages/DebuggerBundle" title-key="label.breakpoint.properties.panel.group.suspend.policy"/>
<border type="none">
<font/>
</border>
<children>
<component id="f6192" class="javax.swing.JRadioButton" binding="mySuspendThreadRadio">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.thread"/>
</properties>
</component>
<component id="876b0" class="javax.swing.JRadioButton" binding="mySuspendNoneRadio">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.none"/>
</properties>
</component>
<component id="106f5" class="javax.swing.JRadioButton" binding="mySuspendAllRadio">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.all"/>
@@ -213,19 +207,46 @@
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.suspend.default"/>
</properties>
</component>
<component id="cd928" class="com.intellij.ui.components.JBCheckBox" binding="mySuspendJBCheckBox">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Suspend"/>
</properties>
</component>
</children>
</grid>
<grid id="8e155" binding="myCompactConditionsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<grid id="7978d" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
<children>
<xy id="f3049" binding="myConditionComboPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</xy>
<component id="46592" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Condition"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<grid id="d03f5" binding="myConditionsPanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="7">
<grid id="d03f5" binding="myConditionsPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="7">
<margin top="2" left="2" bottom="5" right="5"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -239,7 +260,7 @@
<grid id="b404a" binding="myInstanceFiltersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@@ -284,7 +305,7 @@
<grid id="f07fc" binding="myClassFiltersPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@@ -329,7 +350,7 @@
<grid id="21edd" binding="myPassCountPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="0">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@@ -375,61 +396,9 @@
</grid>
<vspacer id="905e2">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<grid id="71106" binding="myConditionPlaceholder" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="bf471" binding="myConditionPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<grid id="7978d" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<xy id="f3049" binding="myConditionComboPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</xy>
<hspacer id="d39a2">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="15" height="-1"/>
</grid>
</constraints>
</hspacer>
</children>
</grid>
<component id="77584" class="javax.swing.JCheckBox" binding="myConditionCheckbox">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<margin top="2" left="2" bottom="0" right="2"/>
<text resource-bundle="messages/DebuggerBundle" key="breakpoint.properties.panel.option.condition"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
</children>
</grid>
</children>
@@ -42,6 +42,7 @@ import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.ui.FieldPanel;
import com.intellij.ui.MultiLineTooltipUI;
import com.intellij.ui.components.JBCheckBox;
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -71,7 +72,6 @@ public abstract class BreakpointPropertiesPanel {
private JCheckBox myLogExpressionCheckBox;
private JCheckBox myLogMessageCheckBox;
protected JCheckBox myPassCountCheckbox;
private JCheckBox myConditionCheckbox;
private JCheckBox myInstanceFiltersCheckBox;
private JCheckBox myClassFiltersCheckBox;
@@ -84,21 +84,19 @@ public abstract class BreakpointPropertiesPanel {
private PsiClass myBreakpointPsiClass;
private JRadioButton mySuspendThreadRadio;
private JRadioButton mySuspendNoneRadio;
private JRadioButton mySuspendAllRadio;
private JRadioButton myDisableAgainRadio;
private JRadioButton myLeaveEnabledRadioButton;
private JLabel myEnableOrDisableLabel;
private JBCheckBox mySuspendJBCheckBox;
private JButton myMakeDefaultButton;
private JRadioButton myDisableAgainRadio;
private JRadioButton myLeaveEnabledRadioButton;
private JLabel myEnableOrDisableLabel;
private JPanel myDependsOnPanel;
private JPanel myInstanceFiltersPanel;
private JPanel myClassFiltersPanel;
private JPanel myPassCountPanel;
private JPanel myConditionsPanel;
private JPanel myConditionPanel;
private JPanel myCompactConditionsPanel;
private JPanel myConditionPlaceholder;
private JPanel myActionsPanel;
ButtonGroup mySuspendPolicyGroup;
@@ -146,14 +144,8 @@ public abstract class BreakpointPropertiesPanel {
myMoreOptionsVisible = b;
myDependsOnPanel.setVisible(b);
myConditionsPanel.setVisible(b);
if (!b) {
myConditionPlaceholder.remove(myConditionPanel);
myCompactConditionsPanel.add(myConditionPanel, BorderLayout.CENTER);
}
else {
if (b) {
myActionsPanel.setVisible(true);
myCompactConditionsPanel.remove(myConditionPanel);
myConditionPlaceholder.add(myConditionPanel, BorderLayout.CENTER);
}
}
@@ -195,8 +187,7 @@ public abstract class BreakpointPropertiesPanel {
mySuspendPolicyGroup = new ButtonGroup();
mySuspendPolicyGroup.add(mySuspendAllRadio);
mySuspendPolicyGroup.add(mySuspendThreadRadio);
mySuspendPolicyGroup.add(mySuspendNoneRadio);
updateSuspendPolicyRbFont();
final ItemListener suspendPolicyChangeListener = new ItemListener() {
public void itemStateChanged(final ItemEvent e) {
@@ -207,8 +198,16 @@ public abstract class BreakpointPropertiesPanel {
}
}
};
mySuspendJBCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
mySuspendAllRadio.setEnabled(mySuspendJBCheckBox.isSelected());
mySuspendThreadRadio.setEnabled(mySuspendJBCheckBox.isSelected());
}
});
mySuspendAllRadio.addItemListener(suspendPolicyChangeListener);
mySuspendNoneRadio.addItemListener(suspendPolicyChangeListener);
mySuspendThreadRadio.addItemListener(suspendPolicyChangeListener);
myMakeDefaultButton.addActionListener(new ActionListener() {
@@ -220,9 +219,6 @@ public abstract class BreakpointPropertiesPanel {
if (DebuggerSettings.SUSPEND_THREAD.equals(suspendPolicy)) {
mySuspendThreadRadio.requestFocus();
}
else if (DebuggerSettings.SUSPEND_NONE.equals(suspendPolicy)) {
mySuspendNoneRadio.requestFocus();
}
else {
mySuspendAllRadio.requestFocus();
}
@@ -312,23 +308,21 @@ public abstract class BreakpointPropertiesPanel {
}
};
myPassCountCheckbox.addActionListener(listener);
myConditionCheckbox.addActionListener(listener);
myInstanceFiltersCheckBox.addActionListener(listener);
myClassFiltersCheckBox.addActionListener(listener);
DebuggerUIUtil.focusEditorOnCheck(myPassCountCheckbox, myPassCountField);
DebuggerUIUtil.focusEditorOnCheck(myConditionCheckbox, myConditionCombo);
DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionCombo);
DebuggerUIUtil.focusEditorOnCheck(myInstanceFiltersCheckBox, myInstanceFiltersField.getTextField());
DebuggerUIUtil.focusEditorOnCheck(myClassFiltersCheckBox, myClassFiltersField.getTextField());
}
private String getSelectedSuspendPolicy() {
if (!mySuspendJBCheckBox.isSelected()) {
return DebuggerSettings.SUSPEND_NONE;
}
if (mySuspendThreadRadio.isSelected()) {
return DebuggerSettings.SUSPEND_THREAD;
}
if (mySuspendNoneRadio.isSelected()) {
return DebuggerSettings.SUSPEND_NONE;
}
return DebuggerSettings.SUSPEND_ALL;
}
@@ -340,7 +334,6 @@ public abstract class BreakpointPropertiesPanel {
mySuspendAllRadio.setFont(DebuggerSettings.SUSPEND_ALL.equals(defPolicy)? boldFont : font);
mySuspendThreadRadio.setFont(DebuggerSettings.SUSPEND_THREAD.equals(defPolicy)? boldFont : font);
mySuspendNoneRadio.setFont(DebuggerSettings.SUSPEND_NONE.equals(defPolicy)? boldFont : font);
}
protected ClassFilter createClassConditionFilter() {
@@ -379,10 +372,19 @@ public abstract class BreakpointPropertiesPanel {
PsiElement context = breakpoint.getEvaluationElement();
myPassCountCheckbox.setSelected(breakpoint.COUNT_FILTER_ENABLED);
myConditionCheckbox.setSelected(breakpoint.CONDITION_ENABLED);
if (!breakpoint.CONDITION_ENABLED) {
myConditionCombo.setText(emptyText());
}
else {
myConditionCombo.setContext(context);
myConditionCombo.setText(breakpoint.getCondition() != null ? breakpoint.getCondition() : emptyText());
}
mySuspendJBCheckBox.setSelected(!breakpoint.SUSPEND_POLICY.equals(DebuggerSettings.SUSPEND_NONE));
mySuspendThreadRadio.setEnabled(mySuspendJBCheckBox.isSelected());
mySuspendAllRadio.setEnabled(mySuspendJBCheckBox.isSelected());
if(DebuggerSettings.SUSPEND_NONE.equals(breakpoint.SUSPEND_POLICY)) {
mySuspendPolicyGroup.setSelected(mySuspendNoneRadio.getModel(), true);
actionsPanelVisible = true;
}
else if(DebuggerSettings.SUSPEND_THREAD.equals(breakpoint.SUSPEND_POLICY)){
@@ -391,16 +393,19 @@ public abstract class BreakpointPropertiesPanel {
else {
mySuspendPolicyGroup.setSelected(mySuspendAllRadio.getModel(), true);
}
mySuspendNoneRadio.addActionListener(new ActionListener() {
mySuspendJBCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
if (!myActionsPanel.isVisible()) {
if (mySuspendNoneRadio.isSelected()) {
if (!mySuspendJBCheckBox.isSelected()) {
if (myDelegate != null) {
myDelegate.showActionsPanel();
}
}
}
mySuspendThreadRadio.setEnabled(mySuspendJBCheckBox.isSelected());
mySuspendAllRadio.setEnabled(mySuspendJBCheckBox.isSelected());
}
});
myLogMessageCheckBox.setSelected(breakpoint.LOG_ENABLED);
@@ -409,16 +414,13 @@ public abstract class BreakpointPropertiesPanel {
actionsPanelVisible = true;
}
myConditionCombo.setContext(context);
myConditionCombo.setText(breakpoint.getCondition() != null ? breakpoint.getCondition() : new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, ""));
myLogExpressionCombo.setContext(context);
if (breakpoint.getLogMessage() != null) {
myLogExpressionCombo.setText(breakpoint.getLogMessage());
}
else {
myLogExpressionCombo.setText(new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, ""));
myLogExpressionCombo.setText(emptyText());
}
myLogExpressionCombo.setEnabled(breakpoint.LOG_EXPRESSION_ENABLED);
@@ -453,6 +455,10 @@ public abstract class BreakpointPropertiesPanel {
setMoreOptionsVisible(moreOptionsVisible);
}
private TextWithImportsImpl emptyText() {
return new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, "");
}
/**
* Save values in the UI components to the breakpoint object
*/
@@ -470,7 +476,7 @@ public abstract class BreakpointPropertiesPanel {
}
breakpoint.COUNT_FILTER_ENABLED = breakpoint.COUNT_FILTER > 0 && myPassCountCheckbox.isSelected();
breakpoint.setCondition(myConditionCombo.getText());
breakpoint.CONDITION_ENABLED = !breakpoint.getCondition().isEmpty() && myConditionCheckbox.isSelected();
breakpoint.CONDITION_ENABLED = !breakpoint.getCondition().isEmpty();
breakpoint.setLogMessage(myLogExpressionCombo.getText());
breakpoint.LOG_EXPRESSION_ENABLED = !breakpoint.getLogMessage().isEmpty() && myLogExpressionCheckBox.isSelected();
breakpoint.LOG_ENABLED = myLogMessageCheckBox.isSelected();
@@ -616,7 +622,7 @@ public abstract class BreakpointPropertiesPanel {
}
protected void updateCheckboxes() {
JCheckBox [] checkBoxes = { myConditionCheckbox, myInstanceFiltersCheckBox, myClassFiltersCheckBox };
JCheckBox [] checkBoxes = {myInstanceFiltersCheckBox, myClassFiltersCheckBox };
JCheckBox selected = null;
for (JCheckBox checkBoxe : checkBoxes) {
if (checkBoxe.isSelected()) {
@@ -624,8 +630,7 @@ public abstract class BreakpointPropertiesPanel {
break;
}
}
if(selected != null){
if(selected != null || !myConditionCombo.getText().isEmpty()){
myPassCountCheckbox.setEnabled(false);
} else {
myPassCountCheckbox.setEnabled(true);
@@ -637,8 +642,8 @@ public abstract class BreakpointPropertiesPanel {
myPassCountField.setEditable(myPassCountCheckbox.isSelected());
myPassCountField.setEnabled (myPassCountCheckbox.isSelected());
myConditionCombo.setEnabled(myConditionCheckbox.isSelected());
myConditionMagnifierButton.setEnabled(myConditionCheckbox.isSelected());
myConditionCombo.setEnabled(true);
myConditionMagnifierButton.setEnabled(true);
myInstanceFiltersField.setEnabled(myInstanceFiltersCheckBox.isSelected());
myInstanceFiltersField.getTextField().setEditable(myInstanceFiltersCheckBox.isSelected());
myClassFiltersField.setEnabled(myClassFiltersCheckBox.isSelected());
@@ -507,7 +507,8 @@ public class GenericsHighlightUtil {
}
else if (superMethod.isConstructor()) return null;
if (checkMethod.hasModifierProperty(PsiModifier.STATIC) && !checkEqualsSuper) {
final boolean atLeast17 = JavaVersionService.getInstance().isAtLeast(checkMethod, JavaSdkVersion.JDK_1_7);
if (checkMethod.hasModifierProperty(PsiModifier.STATIC) && !checkEqualsSuper && !atLeast17) {
return null;
}
@@ -515,7 +516,6 @@ public class GenericsHighlightUtil {
final PsiType retErasure2 = TypeConversionUtil.erasure(superMethod.getReturnType());
boolean differentReturnTypeErasure = !Comparing.equal(retErasure1, retErasure2);
final boolean atLeast17 = JavaVersionService.getInstance().isAtLeast(checkMethod, JavaSdkVersion.JDK_1_7);
if (checkEqualsSuper && atLeast17) {
if (retErasure1 != null && retErasure2 != null) {
differentReturnTypeErasure = !TypeConversionUtil.isAssignable(retErasure1, retErasure2);
@@ -555,7 +555,10 @@ public class GenericsHighlightUtil {
private static HighlightInfo getSameErasureMessage(final boolean sameClass, final PsiMethod method, final PsiMethod superMethod,
TextRange textRange) {
@NonNls final String key = sameClass ? "generics.methods.have.same.erasure" : "generics.methods.have.same.erasure.override";
@NonNls final String key = sameClass ? "generics.methods.have.same.erasure" :
method.hasModifierProperty(PsiModifier.STATIC) ?
"generics.methods.have.same.erasure.hide" :
"generics.methods.have.same.erasure.override";
String description = JavaErrorMessages.message(key, HighlightMethodUtil.createClashMethodMessage(method, superMethod, !sameClass));
return HighlightInfo.createHighlightInfo(HighlightInfoType.ERROR, textRange, description);
}
@@ -133,8 +133,7 @@ public class RefJavaManagerImpl extends RefJavaManager {
refPackage.accept(visitor);
}
}
final THashMap<PsiAnchor, RefElement> refTable = myRefManager.getRefTable();
for (RefElement refElement : refTable.values()) {
for (RefElement refElement : myRefManager.getSortedElements()) {
if (refElement instanceof RefClass) {
RefClass refClass = (RefClass)refElement;
RefMethod refDefaultConstructor = refClass.getDefaultConstructor();
@@ -137,25 +137,27 @@ public class VcsContentAnnotationExceptionFilter implements Filter, FilterMixin
int endIdx = idx == -1 ? worker.getInfo().getThird().getEndOffset() : idx;
consumer.consume(new MyAdditionalHighlight(startOffset + lineStartOffset + startFileOffset + 1, startOffset + lineStartOffset + endIdx));
// also check method
final List<TextRange> ranges = findMethodRange(worker, document, previousLineResult);
if (ranges != null) {
boolean methodChanged = false;
for (TextRange range : ranges) {
if (localChangesCorrector.isRangeChangedLocally(vf, document, range)) {
methodChanged = true;
break;
if (worker.getPsiClass() != null) {
// also check method
final List<TextRange> ranges = findMethodRange(worker, document, previousLineResult);
if (ranges != null) {
boolean methodChanged = false;
for (TextRange range : ranges) {
if (localChangesCorrector.isRangeChangedLocally(vf, document, range)) {
methodChanged = true;
break;
}
final TextRange correctedRange = localChangesCorrector.getCorrectedRange(vf, document, range);
if (vcsContentAnnotation.intervalRecentlyChanged(vf, correctedRange, recentChangeRevision)) {
methodChanged = true;
break;
}
}
final TextRange correctedRange = localChangesCorrector.getCorrectedRange(vf, document, range);
if (vcsContentAnnotation.intervalRecentlyChanged(vf, correctedRange, recentChangeRevision)) {
methodChanged = true;
break;
if (methodChanged) {
consumer.consume(new MyAdditionalHighlight(startOffset + lineStartOffset + worker.getInfo().getSecond().getStartOffset(),
startOffset + lineStartOffset + worker.getInfo().getSecond().getEndOffset()));
}
}
if (methodChanged) {
consumer.consume(new MyAdditionalHighlight(startOffset + lineStartOffset + worker.getInfo().getSecond().getStartOffset(),
startOffset + lineStartOffset + worker.getInfo().getSecond().getEndOffset()));
}
}
}
}
@@ -16,6 +16,7 @@
package com.intellij.unscramble;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.ui.ListCellRendererWrapper;
import com.intellij.ide.util.PropertiesComponent;
@@ -29,8 +30,11 @@ import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Condition;
import com.intellij.openapi.util.IconLoader;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
import com.intellij.openapi.vcs.configurable.VcsContentAnnotationConfigurable;
import com.intellij.openapi.vfs.VirtualFile;
@@ -38,6 +42,7 @@ import com.intellij.ui.GuiUtils;
import com.intellij.ui.TextFieldWithHistory;
import com.intellij.util.ArrayUtil;
import com.intellij.util.Consumer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.CharArrayUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.Nullable;
@@ -46,6 +51,9 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -57,6 +65,15 @@ public class UnscrambleDialog extends DialogWrapper {
@NonNls private static final String PROPERTY_LOG_FILE_HISTORY_URLS = "UNSCRAMBLE_LOG_FILE_URL";
@NonNls private static final String PROPERTY_LOG_FILE_LAST_URL = "UNSCRAMBLE_LOG_FILE_LAST_URL";
@NonNls private static final String PROPERTY_UNSCRAMBLER_NAME_USED = "UNSCRAMBLER_NAME_USED";
private static final Condition<ThreadState> DEADLOCK_CONDITION = new Condition<ThreadState>() {
@Override
public boolean value(ThreadState state) {
return state.isDeadlocked();
}
};
private static final Icon THREAD_DUMP_ICON = IconLoader.getIcon("/debugger/threadStates/threaddump.png");
private static final Icon DEADLOCK_ICON = IconLoader.getIcon("/debugger/killProcess.png");
private static final Icon EXCEPTION_ICON = IconLoader.getIcon("/debugger/threadStates/exception.png");
private final Project myProject;
private JPanel myEditorPanel;
@@ -358,25 +375,43 @@ public class UnscrambleDialog extends DialogWrapper {
private boolean performUnscramble() {
UnscrambleSupport selectedUnscrambler = getSelectedUnscrambler();
return showUnscrambledText(selectedUnscrambler, myLogFile.getText(), myProject, myStacktraceEditorPanel.getText());
return showUnscrambledText(selectedUnscrambler, myLogFile.getText(), myProject, myStacktraceEditorPanel.getText()) != null;
}
static boolean showUnscrambledText(UnscrambleSupport unscrambleSupport, String logName, Project project, String textToUnscramble) {
@Nullable
static RunContentDescriptor showUnscrambledText(@Nullable UnscrambleSupport unscrambleSupport,
String logName,
Project project,
String textToUnscramble) {
String unscrambledTrace = unscrambleSupport == null ? textToUnscramble : unscrambleSupport.unscramble(project,textToUnscramble, logName);
if (unscrambledTrace == null) return false;
if (unscrambledTrace == null) return null;
List<ThreadState> threadStates = ThreadDumpParser.parse(unscrambledTrace);
final ConsoleView consoleView = addConsole(project, threadStates);
consoleView.allowHeavyFilters();
AnalyzeStacktraceUtil.printStacktrace(consoleView, unscrambledTrace);
return true;
return addConsole(project, threadStates, unscrambledTrace);
}
public static ConsoleView addConsole(final Project project, final List<ThreadState> threadDump) {
private static RunContentDescriptor addConsole(final Project project, final List<ThreadState> threadDump, String unscrambledTrace) {
Icon icon = null;
String message = IdeBundle.message("unscramble.unscrambled.stacktrace.tab");
if (!threadDump.isEmpty()) {
message = IdeBundle.message("unscramble.unscrambled.threaddump.tab");
icon = THREAD_DUMP_ICON;
}
else {
String name = getExceptionName(unscrambledTrace);
if (name != null) {
message = name;
icon = EXCEPTION_ICON;
}
}
if (ContainerUtil.find(threadDump, DEADLOCK_CONDITION) != null) {
message = IdeBundle.message("unscramble.unscrambled.deadlock.tab");
icon = DEADLOCK_ICON;
}
return AnalyzeStacktraceUtil.addConsole(project, threadDump.size() > 1 ? new AnalyzeStacktraceUtil.ConsoleFactory() {
public JComponent createConsoleComponent(ConsoleView consoleView, DefaultActionGroup toolbarActions) {
return new ThreadDumpPanel(project, consoleView, toolbarActions, threadDump);
}
} : null, IdeBundle.message("unscramble.unscrambled.stacktrace.tab"));
} : null, message, unscrambledTrace, icon);
}
protected String getDimensionServiceKey(){
@@ -386,4 +421,53 @@ public class UnscrambleDialog extends DialogWrapper {
public JComponent getPreferredFocusedComponent() {
return myStacktraceEditorPanel.getEditorComponent();
}
@Nullable
private static String getExceptionName(String unscrambledTrace) {
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
BufferedReader reader = new BufferedReader(new StringReader(unscrambledTrace));
for (int i = 0; i < 3; i++) {
try {
String line = reader.readLine();
if (line == null) return null;
line = line.trim();
String name = getExceptionAbbreviation(line);
if (name != null) return name;
}
catch (IOException e) {
return null;
}
}
return null;
}
@Nullable
private static String getExceptionAbbreviation(String line) {
int lastDelimiter = 0;
for (int j = 0; j < line.length(); j++) {
char c = line.charAt(j);
if (c == '.' || c == '$') {
lastDelimiter = j;
continue;
}
if (!StringUtil.isJavaIdentifierPart(c)) {
return null;
}
}
String clazz = line.substring(lastDelimiter);
String abbreviate = abbreviate(clazz);
return abbreviate.length() > 1 ? abbreviate : clazz;
}
private static String abbreviate(String s) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (Character.isUpperCase(c)) {
builder.append(c);
}
}
return builder.toString();
}
}
@@ -1,55 +0,0 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.unscramble;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.project.Project;
public final class UnscrambleFromClipboardAction extends AnAction {
public void actionPerformed(AnActionEvent e) {
Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());
// If there's a text in clipboard and log is specified or not needed, unscramble w/o extra questions
String text = AnalyzeStacktraceUtil.getTextInClipboard();
if (text != null) {
String file = UnscrambleDialog.getLastUsedLogUrl();
if (file != null && file.trim().length() == 0) {
file = null;
}
UnscrambleSupport savedUnscrambler = UnscrambleDialog.getSavedUnscrambler();
if (savedUnscrambler == null || file != null) {
boolean success = UnscrambleDialog.showUnscrambledText(savedUnscrambler, file, project, text);
if (success) {
return;
}
}
}
// Use regular unscramble dialog
UnscrambleDialog dialog = new UnscrambleDialog(project);
dialog.show();
}
public void update(AnActionEvent event){
Presentation presentation = event.getPresentation();
Project project = PlatformDataKeys.PROJECT.getData(event.getDataContext());
presentation.setEnabled(project != null);
}
}
@@ -216,10 +216,11 @@ public class GenericsUtil {
PsiClassType[] extendsTypes = typeParameter.getExtendsListTypes();
for (PsiClassType type : extendsTypes) {
PsiType extendsType = substitutor.substitute(type);
if (!extendsType.isAssignableFrom(substituted)) {
return false;
if (extendsType.isAssignableFrom(substituted)) {
return true;
}
}
if (extendsTypes.length > 0) return false;
}
return true;
@@ -31,10 +31,7 @@ import gnu.trove.THashSet;
import gnu.trove.TIntArrayList;
import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* Created by IntelliJ IDEA.
@@ -281,7 +278,7 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
@MethodCandidateInfo.ApplicabilityLevelConstant int maxApplicabilityLevel = 0;
boolean toFilter = false;
for (CandidateInfo conflict : conflicts) {
@MethodCandidateInfo.ApplicabilityLevelConstant final int level = ((MethodCandidateInfo)conflict).getApplicabilityLevel();
final @MethodCandidateInfo.ApplicabilityLevelConstant int level = preferVarargs((MethodCandidateInfo)conflict);
if (maxApplicabilityLevel > 0 && maxApplicabilityLevel != level) {
toFilter = true;
}
@@ -293,7 +290,7 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
if (toFilter) {
for (Iterator<CandidateInfo> iterator = conflicts.iterator(); iterator.hasNext();) {
CandidateInfo info = iterator.next();
final int level = ((MethodCandidateInfo)info).getApplicabilityLevel(); //cached
final int level = preferVarargs(info);
if (level < maxApplicabilityLevel) {
iterator.remove();
}
@@ -303,6 +300,17 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
return maxApplicabilityLevel;
}
private static int preferVarargs(CandidateInfo info) {
final int level = ((MethodCandidateInfo)info).getApplicabilityLevel();
if (level == MethodCandidateInfo.ApplicabilityLevel.FIXED_ARITY) {
final PsiMethod psiMethod = (PsiMethod)info.getElement();
if (psiMethod != null && psiMethod.isVarArgs() && JavaVersionService.getInstance().isAtLeast(psiMethod, JavaSdkVersion.JDK_1_7)) {
return level + 1;
}
}
return level;
}
private static int getCheckLevel(MethodCandidateInfo method){
boolean visible = method.isAccessible();// && !method.myStaticProblem;
boolean available = method.isStaticsScopeCorrect();
@@ -318,10 +326,19 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
}
private static Specifics checkSubtyping(PsiType type1, PsiType type2, PsiMethod method1, PsiMethod method2) {
boolean noBoxing = type1 instanceof PsiPrimitiveType == type2 instanceof PsiPrimitiveType;
return checkSubtyping(type1, type2, method1, method2, true);
}
@Nullable
private static Specifics checkSubtyping(PsiType type1,
PsiType type2,
PsiMethod method1,
PsiMethod method2,
boolean boxingHappening) {
boolean noBoxing = boxingHappening || type1 instanceof PsiPrimitiveType == type2 instanceof PsiPrimitiveType;
final boolean allowUncheckedConversion =
!method1.hasModifierProperty(PsiModifier.STATIC) && !method2.hasModifierProperty(PsiModifier.STATIC) ||
method1.getContainingClass() == method2.getContainingClass();
method1.getContainingClass() == method2.getContainingClass();
final boolean assignable2From1 = noBoxing && TypeConversionUtil.isAssignable(type2, type1, allowUncheckedConversion);
final boolean assignable1From2 = noBoxing && TypeConversionUtil.isAssignable(type1, type2, allowUncheckedConversion);
if (assignable1From2 || assignable2From1) {
@@ -332,7 +349,7 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
return assignable1From2 ? Specifics.SECOND : Specifics.FIRST;
}
return Specifics.NEITHER;
return allowUncheckedConversion ? Specifics.NEITHER : null;
}
private boolean isBoxingHappened(PsiType argType, PsiType parameterType) {
@@ -358,8 +375,6 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
final PsiTypeParameter[] typeParameters2 = method2.getTypeParameters();
final PsiSubstitutor classSubstitutor1 = info1.getSubstitutor(); //substitutions for method type parameters will be ignored
final PsiSubstitutor classSubstitutor2 = info2.getSubstitutor();
PsiSubstitutor methodSubstitutor1 = PsiSubstitutor.EMPTY;
PsiSubstitutor methodSubstitutor2 = PsiSubstitutor.EMPTY;
final int max = Math.max(params1.length, params2.length);
PsiType[] types1 = new PsiType[max];
@@ -382,26 +397,10 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
types2[i] = type2;
}
if (typeParameters1.length == 0 || typeParameters2.length == 0) {
if (typeParameters1.length > 0) {
final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getResolveHelper();
methodSubstitutor1 = calculateMethodSubstitutor(typeParameters1, types1, types2, resolveHelper);
}
else if (typeParameters2.length > 0) {
final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getResolveHelper();
methodSubstitutor2 = calculateMethodSubstitutor(typeParameters2, types2, types1, resolveHelper);
}
}
else {
PsiElementFactory factory = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getElementFactory();
methodSubstitutor1 = factory.createRawSubstitutor(PsiSubstitutor.EMPTY, typeParameters1);
methodSubstitutor2 = factory.createRawSubstitutor(PsiSubstitutor.EMPTY, typeParameters2);
}
int[] boxingHappened = new int[2];
for (int i = 0; i < types1.length; i++) {
PsiType type1 = classSubstitutor1.substitute(methodSubstitutor1.substitute(types1[i]));
PsiType type2 = classSubstitutor2.substitute(methodSubstitutor2.substitute(types2[i]));
PsiType type1 = classSubstitutor1.substitute(types1[i]);
PsiType type2 = classSubstitutor2.substitute(types2[i]);
PsiType argType = i < myActualParameterTypes.length ? myActualParameterTypes[i] : null;
boxingHappened[0] += isBoxingHappened(argType, type1) ? 1 : 0;
@@ -412,15 +411,31 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
Specifics isMoreSpecific = null;
for (int i = 0; i < types1.length; i++) {
PsiType type1 = classSubstitutor1.substitute(methodSubstitutor1.substitute(types1[i]));
PsiType type2 = classSubstitutor2.substitute(methodSubstitutor2.substitute(types2[i]));
Specifics specifics = type1 == null || type2 == null ? null : checkSubtyping(type1, type2, method1, method2);
Specifics specifics = checkSubstitutorSpecific(method1, method2, classSubstitutor1, classSubstitutor2, types1[i], types2[i], isMoreSpecific);
if (specifics == null) {
if (Comparing.equal(type1, type2)) {
specifics = checkSubstitutorSpecific(method1, method2, classSubstitutor1, classSubstitutor2, types1[i], types2[i]);
PsiSubstitutor methodSubstitutor1 = PsiSubstitutor.EMPTY;
PsiSubstitutor methodSubstitutor2 = PsiSubstitutor.EMPTY;
if (typeParameters1.length == 0 || typeParameters2.length == 0) {
if (typeParameters1.length > 0) {
final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getResolveHelper();
methodSubstitutor1 = calculateMethodSubstitutor(typeParameters1, types1, types2, resolveHelper);
}
else if (typeParameters2.length > 0) {
final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getResolveHelper();
methodSubstitutor2 = calculateMethodSubstitutor(typeParameters2, types2, types1, resolveHelper);
}
}
else {
PsiElementFactory factory = JavaPsiFacade.getInstance(myArgumentsList.getProject()).getElementFactory();
methodSubstitutor1 = factory.createRawSubstitutor(PsiSubstitutor.EMPTY, typeParameters1);
methodSubstitutor2 = factory.createRawSubstitutor(PsiSubstitutor.EMPTY, typeParameters2);
}
PsiType type1 = classSubstitutor1.substitute(methodSubstitutor1.substitute(types1[i]));
PsiType type2 = classSubstitutor2.substitute(methodSubstitutor2.substitute(types2[i]));
specifics = type1 == null || type2 == null ? null : checkSubtyping(type1, type2, method1, method2, boxingHappened[0] == 0 || boxingHappened[1] == 0);
if (specifics == null) {
continue;
}
if (specifics == null) continue;
}
switch (specifics) {
@@ -473,7 +488,7 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
PsiSubstitutor classSubstitutor1,
PsiSubstitutor classSubstitutor2,
PsiType type1,
PsiType type2) {
PsiType type2, Specifics moreSpecific) {
final Map<PsiTypeParameter, PsiType> map1 = classSubstitutor1.getSubstitutionMap();
final Map<PsiTypeParameter, PsiType> map2 = classSubstitutor2.getSubstitutionMap();
@@ -491,20 +506,60 @@ public class JavaMethodsConflictResolver implements PsiConflictResolver{
else {
final PsiTypeParameter p1 = map1.keySet().iterator().next();
final PsiTypeParameter p2 = map2.keySet().iterator().next();
Specifics specifics = checkSubtyping(TypeConversionUtil.erasure(PsiSubstitutor.EMPTY.substitute(p1)),
TypeConversionUtil.erasure(PsiSubstitutor.EMPTY.substitute(p2)), method1, method2);
if (specifics != null) {
return specifics;
} else {
final PsiType ctype1 = classSubstitutor1.substitute(type1);
final PsiType ctype2 = classSubstitutor2.substitute(type2);
return checkSubtyping(ctype1, ctype2, method1, method2);
}
return checkTypeParams(method1, method2, classSubstitutor1, classSubstitutor2, type1, type2, p1, p2, moreSpecific);
}
} else {
final PsiClass aClass1 = PsiUtil.resolveClassInClassTypeOnly(type1);
final PsiClass aClass2 = PsiUtil.resolveClassInClassTypeOnly(type2);
if (aClass1 instanceof PsiTypeParameter && aClass2 instanceof PsiTypeParameter) {
return checkTypeParams(method1, method2, classSubstitutor1, classSubstitutor2, type1, type2, (PsiTypeParameter)aClass1, (PsiTypeParameter)aClass2,
moreSpecific);
}
}
return null;
}
@Nullable
private static Specifics checkTypeParams(PsiMethod method1,
PsiMethod method2,
PsiSubstitutor classSubstitutor1,
PsiSubstitutor classSubstitutor2,
PsiType type1,
PsiType type2,
PsiTypeParameter p1,
PsiTypeParameter p2, Specifics moreSpecific) {
Specifics specifics = checkSubtyping(TypeConversionUtil.erasure(PsiSubstitutor.EMPTY.substitute(p1)),
TypeConversionUtil.erasure(PsiSubstitutor.EMPTY.substitute(p2)), method1, method2);
if (specifics == Specifics.NEITHER) {
final Set<PsiElement> resolved1 = new HashSet<PsiElement>();
for (PsiJavaCodeReferenceElement referenceElement : p1.getExtendsList().getReferenceElements()) {
final PsiElement resolve = referenceElement.resolve();
if (resolve != null) {
resolved1.add(resolve);
}
}
final Set<PsiElement> resolved2 = new HashSet<PsiElement>();
for (PsiJavaCodeReferenceElement referenceElement : p2.getExtendsList().getReferenceElements()) {
final PsiElement resolve = referenceElement.resolve();
if (resolve != null) {
resolved2.add(resolve);
}
}
if (resolved1.size() > resolved2.size() && resolved1.containsAll(resolved2)) return Specifics.FIRST;
if (resolved2.size() > resolved1.size() && resolved2.containsAll(resolved1)) return Specifics.SECOND;
}
if (specifics != null) {
return specifics;
} else {
final PsiType ctype1 = classSubstitutor1.substitute(type1);
final PsiType ctype2 = classSubstitutor2.substitute(type2);
specifics = checkSubtyping(ctype1, ctype2, method1, method2);
return specifics == null && moreSpecific == null ? Specifics.NEITHER : specifics;
}
}
private PsiSubstitutor calculateMethodSubstitutor(final PsiTypeParameter[] typeParameters,
final PsiType[] types1,
final PsiType[] types2,
@@ -54,6 +54,7 @@ generics.cannot.be.inherited.with.different.type.arguments=''{0}'' cannot be inh
generics.select.static.class.from.parameterized.type=Cannot select static class ''{0}'' from parameterized type
generics.methods.have.same.erasure={0}; both methods have same erasure
generics.methods.have.same.erasure.override={0}; both methods have same erasure, yet neither overrides the other
generics.methods.have.same.erasure.hide={0}; both methods have same erasure, yet neither hides the other
generics.type.parameter.cannot.be.instantiated=Type parameter ''{0}'' cannot be instantiated directly
wildcard.type.cannot.be.instantiated=Wildcard type ''{0}'' cannot be instantiated directly
generics.wildcard.not.expected=No wildcard expected
@@ -0,0 +1,15 @@
package pck;
class TestCase {
void assertEquals(Object o1, Object o2) {}
void assertEquals(int i1, int i2) {}
}
class Test extends TestCase {
void test() {
int expected = 1;
Integer actual = 2;
assertEquals<error descr="Ambiguous method call: both 'TestCase.assertEquals(Object, Object)' and 'TestCase.assertEquals(int, int)' match">(expected, actual)</error>;
}
}
@@ -0,0 +1,30 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pck;
import static pck.Assert.assertEquals;
class Assert {
static void assertEquals(Object o1, Object o2) {}
static void assertEquals(long l1, long l2) {}
}
class Test {
void test() {
assertEquals<error descr="Ambiguous method call: both 'Assert.assertEquals(Object, Object)' and 'Assert.assertEquals(long, long)' match">(100L, Long.valueOf(100L))</error>;
}
}
@@ -0,0 +1,43 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pck;
import java.util.ArrayList;
import java.util.List;
class IdeaBug {
public static void main(String[] args) {
ClassA.copyOf(new ArrayList<String>());
}
private static class ClassA<E> extends ClassB<E> {
<error descr="'copyOf(Iterable<? extends E>)' in 'pck.IdeaBug.ClassA' clashes with 'copyOf(Iterable<? extends E>)' in 'pck.IdeaBug.ClassB'; both methods have same erasure, yet neither hides the other">public static <E extends Comparable<? super E>> ClassA<E> copyOf(
Iterable<? extends E> elements)</error> {
System.out.println("Hello from ClassA");
return null;
}
}
private static class ClassB<E> {
public static <E> ClassA<E> copyOf(Iterable<? extends E> elements) {
System.out.println("Hello from ClassB");
return null;
}
}
}
@@ -0,0 +1,29 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package pck;
class Generics<T> {
public void render(T t) {
System.out.println("generic");
}
public void render(Integer t) {
System.out.println("int");
}
static {
new Generics<Integer>().render<error descr="Ambiguous method call: both 'Generics.render(Integer)' and 'Generics.render(Integer)' match">(5)</error>;
}
}
@@ -0,0 +1,19 @@
package pck;
class A {
<T> void foo(T x) {
foo(1);
long x1 = 1L;
foo(x1);
Long x2 = 1L;
foo(x2);
Integer x3 = 1;
foo(x3);
}
void foo(long x) {
}
}
@@ -0,0 +1,12 @@
package pck;
interface I{
<T extends Iterable<String> & Cloneable> void foo();
}
abstract class A {
abstract <T extends Iterable<String>> void foo();
<T extends A & I> void bar(T x){
x.foo<error descr="Ambiguous method call: both 'A.foo()' and 'I.foo()' match">()</error>;
}
}
@@ -0,0 +1,15 @@
package pck;
class A<T> {}
interface IA{
<T> void foo(A<T> x);
}
interface IB{
<T extends Exception> void foo(A<T> x);
}
class C {
<<error descr="'foo(A<T>)' in 'pck.IB' clashes with 'foo(A<T>)' in 'pck.IA'; both methods have same erasure, yet neither overrides the other"></error>T extends IA & IB> void bar(T x, A<Exception> y){
x.foo(y);
}
}
@@ -0,0 +1,11 @@
package pck;
class B<K> {}
class A<K> extends B<K> {
void foo(A<A<String>> b){
bar<error descr="Ambiguous method call: both 'A.bar(B<? extends A<String>>)' and 'A.bar(A<? extends B<String>>)' match">(b)</error>;
}
<T> void bar(B<? extends A<T>> a){}
<T> void bar(A<? extends B<T>> a){}
}
@@ -0,0 +1,9 @@
package pck;
abstract class C{
abstract <T extends Comparable<?>> void foo(T x);
abstract <T extends Number & Comparable<?>> void foo(T x);
void bar(Integer x){
foo(x);
}
}
@@ -0,0 +1,17 @@
interface A
{
abstract void foo(String[] ... s);
}
interface B
{
abstract void foo(String[] s);
}
class C<T extends A & B>
{
void bar(T x)
{
x.foo(null);
}
}
@@ -0,0 +1,17 @@
package pck;
import static pck.D.foo;
import static pck.C.foo;
public class C {
public static <T extends Comparable<S>, S> void foo(T x){}
}
class D {
public static <T extends Comparable<?>> void foo(T x){}
}
class B{
{
foo<error descr="Ambiguous method call: both 'D.foo(Integer)' and 'C.foo(Integer)' match">(1)</error>;
}
}
@@ -0,0 +1,18 @@
package pck;
import static pck.D.foo;
import static pck.C.foo;
public class C {
public static <T> void foo(Comparable<? extends Comparable<T>> x){}
}
class D {
public static void foo(Comparable<? extends Number> x){}
}
class B{
public static void bar(){
foo<error descr="Ambiguous method call: both 'D.foo(Comparable<? extends Number>)' and 'C.foo(Comparable<? extends Comparable<Integer>>)' match">(1)</error>;
}
}
@@ -0,0 +1,17 @@
package pck;
class Test {
void test() {
B.method(new ArgumentB());
}
}
class A {
static void method(ArgumentA a) { }
}
class B extends A {
static void method(ArgumentB b) { }
}
class ArgumentA<T> {}
class ArgumentB extends ArgumentA<Object> {}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems/>
@@ -0,0 +1,15 @@
public class RedundantIntCast
{
public static void main(String[] args) {
Integer i = 8;
method((int)i, 1); // int cast is marked as redundant
}
static void method(Object o, Object o1) {
System.out.println("this method works on objects");
}
static void method(int i, int i1) {
System.out.println("this method works on ints");
}
}
@@ -0,0 +1,773 @@
2011-11-25 20:12:30
Full thread dump Java HotSpot(TM) 64-Bit Server VM (17.1-b03-307 mixed mode):
"Attach Listener" daemon prio=9 tid=103588000 nid=0x113fb6000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"process reaper" daemon prio=4 tid=11d190800 nid=0x116755000 runnable [116754000]
java.lang.Thread.State: RUNNABLE
at java.lang.UNIXProcess.waitForProcessExit(Native Method)
at java.lang.UNIXProcess.access$900(UNIXProcess.java:17)
at java.lang.UNIXProcess$2$1.run(UNIXProcess.java:86)
Locked ownable synchronizers:
- None
"Alarm pool(own)" daemon prio=3 tid=114486000 nid=0x11b102000 waiting on condition [11b101000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7caf15c60> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"JobScheduler pool 0/1" prio=5 tid=115659000 nid=0x11ac6c000 waiting for monitor entry [11ac6a000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:339)
- waiting to lock <7c9734008> (a com.intellij.util.io.PersistentBTreeEnumerator)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:77)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:67)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:134)
- locked <7c9733fa0> (a com.intellij.util.indexing.ValueContainerMap)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:98)
at com.intellij.util.indexing.FileBasedIndex.processValuesImpl(FileBasedIndex.java:900)
at com.intellij.util.indexing.FileBasedIndex.getValues(FileBasedIndex.java:822)
at com.intellij.javascript.flex.css.FlexCssElementDescriptorProvider.getPropertyDescriptor(FlexCssElementDescriptorProvider.java:180)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getPropertyDescriptor(CssDescriptorsUtil.java:50)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getCannonicalPropertyName(CssDescriptorsUtil.java:98)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getCannonicalPropertyName(CssDescriptorsUtil.java:104)
at com.intellij.psi.css.browse.CssColorAnnotator.annotate(CssColorAnnotator.java:105)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:157)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:593)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:771)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:639)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:204)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1034)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- <7ca6bf518> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"RefCountingStorage write content helper" prio=4 tid=11570f000 nid=0x11a434000 waiting on condition [11a433000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c8fdddc0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"ApplicationImpl pooled thread 8" prio=4 tid=10367e800 nid=0x118b45000 waiting on condition [118b44000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.util.io.OutputReader.doRun(OutputReader.java:65)
at com.intellij.util.io.OutputReader.access$000(OutputReader.java:27)
at com.intellij.util.io.OutputReader$1.run(OutputReader.java:44)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:421)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- <7c9b5c150> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"ApplicationImpl pooled thread 7" prio=4 tid=1145bb800 nid=0x118a42000 waiting on condition [118a41000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c94dc7d0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- None
"ApplicationImpl pooled thread 6" prio=4 tid=114112800 nid=0x11893f000 waiting on condition [11893e000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.util.io.OutputReader.doRun(OutputReader.java:65)
at com.intellij.util.io.OutputReader.access$000(OutputReader.java:27)
at com.intellij.util.io.OutputReader$1.run(OutputReader.java:44)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:421)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- <7c9b5bbf8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"ApplicationImpl pooled thread 5" prio=4 tid=103346000 nid=0x117689000 waiting on condition [117688000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c94dc7d0> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- None
"ApplicationImpl pooled thread 4" prio=4 tid=114698800 nid=0x117586000 in Object.wait() [117585000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7ce02f4b0> (a java.lang.UNIXProcess)
at java.lang.Object.wait(Object.java:485)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:115)
- locked <7ce02f4b0> (a java.lang.UNIXProcess)
at com.intellij.execution.process.BaseOSProcessHandler$ProcessWaitFor$1.run(BaseOSProcessHandler.java:221)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:421)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- <7c9b5b7d8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"ApplicationImpl pooled thread 3" prio=4 tid=1032bb000 nid=0x117483000 in Object.wait() [117482000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c94992c0> (a com.intellij.util.concurrency.WriterPreferenceReadWriteLock$ReaderLock)
at java.lang.Object.wait(Object.java:485)
at com.intellij.util.concurrency.WriterPreferenceReadWriteLock$ReaderLock.acquire(WriterPreferenceReadWriteLock.java:162)
- locked <7c94992c0> (a com.intellij.util.concurrency.WriterPreferenceReadWriteLock$ReaderLock)
at com.intellij.openapi.application.impl.ApplicationImpl$ReadAccessToken.<init>(ApplicationImpl.java:1161)
at com.intellij.openapi.application.impl.ApplicationImpl.acquireReadActionLockImpl(ApplicationImpl.java:1087)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:870)
at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:139)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:242)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:229)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:211)
at com.intellij.flex.uiDesigner.DesignerApplicationManager.getService(DesignerApplicationManager.java:56)
at com.intellij.flex.uiDesigner.Client.getInstance(Client.java:40)
at com.intellij.flex.uiDesigner.io.MessageSocketManager.setOut(MessageSocketManager.java:23)
at com.intellij.flex.uiDesigner.io.SocketManager.run(SocketManager.java:32)
at com.intellij.flex.uiDesigner.io.MessageSocketManager.run(MessageSocketManager.java:12)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:421)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- <7c9b5b5c8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"FS Synchronizer" daemon prio=5 tid=1032b4000 nid=0x117380000 waiting on condition [11737f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c8ff7788> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Animations" daemon prio=5 tid=114626000 nid=0x116aa0000 runnable [116a9f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c9796698> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"TimerQueue" daemon prio=5 tid=1145b3000 nid=0x11699d000 in Object.wait() [11699c000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c98b8fd0> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:232)
- locked <7c98b8fd0> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Alarm pool(shared)" daemon prio=3 tid=11426d800 nid=0x11689a000 in Object.wait() [116899000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7b85d56d8> (a java.awt.EventQueue$1AWTInvocationLock)
at java.lang.Object.wait(Object.java:485)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1029)
- locked <7b85d56d8> (a java.awt.EventQueue$1AWTInvocationLock)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1320)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:222)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- <7c97aaec0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"LowMemoryWatcher" daemon prio=4 tid=1037c8800 nid=0x11628b000 in Object.wait() [11628a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c96c9d28> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7c96c9d28> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at com.intellij.openapi.util.LowMemoryWatcher$1.run(LowMemoryWatcher.java:60)
Locked ownable synchronizers:
- None
"FocusManager timer" daemon prio=2 tid=114152800 nid=0x115fe6000 in Object.wait() [115fe5000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c96b4228> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <7c96b4228> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
Locked ownable synchronizers:
- None
"Shared SimpleTimer" daemon prio=2 tid=103694800 nid=0x115ee3000 in Object.wait() [115ee2000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c96b3d48> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <7c96b3d48> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
Locked ownable synchronizers:
- None
"XML-RPC Weblistener" prio=3 tid=103784800 nid=0x115de0000 runnable [115ddf000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <7c96a0fa8> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.xmlrpc.WebServer.run(WebServer.java:453)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Performance watcher" prio=1 tid=10370b000 nid=0x115cdd000 waiting on condition [115cdc000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c969e910> (a java.util.concurrent.Semaphore$NonfairSync)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1011)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1303)
at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:383)
at com.intellij.diagnostic.PerformanceWatcher.checkEDTResponsiveness(PerformanceWatcher.java:156)
at com.intellij.diagnostic.PerformanceWatcher.access$100(PerformanceWatcher.java:40)
at com.intellij.diagnostic.PerformanceWatcher$2.run(PerformanceWatcher.java:111)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Document commit thread" prio=6 tid=1140a8800 nid=0x115901000 in Object.wait() [115900000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c90bc598> (a com.intellij.util.containers.Queue)
at java.lang.Object.wait(Object.java:485)
at com.intellij.psi.impl.DocumentCommitThread.run(DocumentCommitThread.java:275)
- locked <7c90bc598> (a com.intellij.util.containers.Queue)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"ApplicationImpl pooled thread 0 [ReadAccessToken]" prio=4 tid=103693800 nid=0x114901000 waiting for monitor entry [1148ff000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:127)
- waiting to lock <7c9733fa0> (a com.intellij.util.indexing.ValueContainerMap)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:98)
at com.intellij.util.indexing.FileBasedIndex.processValuesImpl(FileBasedIndex.java:887)
at com.intellij.util.indexing.FileBasedIndex.processValues(FileBasedIndex.java:860)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector$1.process(LibraryStyleInfoCollector.java:42)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector$1.process(LibraryStyleInfoCollector.java:39)
at com.intellij.util.indexing.MemoryIndexStorage$1.process(MemoryIndexStorage.java:118)
at com.intellij.util.io.PersistentEnumeratorBase.iterateData(PersistentEnumeratorBase.java:373)
- locked <7c8fd4558> (a com.intellij.util.io.PagedFileStorage$StorageLock)
at com.intellij.util.io.PersistentHashMap.processKeys(PersistentHashMap.java:318)
- locked <7c9734008> (a com.intellij.util.io.PersistentBTreeEnumerator)
at com.intellij.util.indexing.MapIndexStorage.processKeys(MapIndexStorage.java:173)
at com.intellij.util.indexing.MemoryIndexStorage.processKeys(MemoryIndexStorage.java:126)
at com.intellij.util.indexing.MapReduceIndex.processAllKeys(MapReduceIndex.java:164)
at com.intellij.util.indexing.FileBasedIndex.processAllKeys(FileBasedIndex.java:688)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.collectInherited(LibraryStyleInfoCollector.java:39)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.consume(LibraryStyleInfoCollector.java:73)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.consume(LibraryStyleInfoCollector.java:19)
at com.intellij.flex.uiDesigner.libraries.LibraryManager.createOriginalLibrary(LibraryManager.java:268)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.addLibrary(LibraryCollector.java:243)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.collectFromSdkOrderEntry(LibraryCollector.java:223)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.collect(LibraryCollector.java:138)
at com.intellij.flex.uiDesigner.libraries.LibraryManager.initLibrarySets(LibraryManager.java:95)
at com.intellij.flex.uiDesigner.DesignerApplicationLauncher$7.call(DesignerApplicationLauncher.java:376)
at com.intellij.flex.uiDesigner.DesignerApplicationLauncher$7.call(DesignerApplicationLauncher.java:364)
at com.intellij.openapi.application.impl.ApplicationImpl$7.call(ApplicationImpl.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Locked ownable synchronizers:
- <7c9054a10> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
- <7c9733f80> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"Progress Cancel Checker" prio=9 tid=1035c0800 nid=0x114f46000 waiting on condition [114f45000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:60)
Locked ownable synchronizers:
- None
"StoreRefreshStatusThread" daemon prio=1 tid=1035b8000 nid=0x114e43000 waiting on condition [114e42000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl$StoreRefreshStatusThread.run(LocalFileSystemImpl.java:325)
Locked ownable synchronizers:
- None
"WatchForChangesThread" prio=6 tid=1030a5000 nid=0x114d40000 runnable [114d3f000]
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
- locked <7c8fe2010> (a java.io.BufferedInputStream)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
- locked <7c8fe4248> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
- locked <7c8fe4248> (a java.io.InputStreamReader)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at com.intellij.openapi.vfs.impl.local.FileWatcher.readLine(FileWatcher.java:481)
at com.intellij.openapi.vfs.impl.local.FileWatcher.access$300(FileWatcher.java:48)
at com.intellij.openapi.vfs.impl.local.FileWatcher$WatchForChangesThread.run(FileWatcher.java:354)
Locked ownable synchronizers:
- None
"process reaper" daemon prio=6 tid=1030a4000 nid=0x114c3d000 runnable [114c3c000]
java.lang.Thread.State: RUNNABLE
at java.lang.UNIXProcess.waitForProcessExit(Native Method)
at java.lang.UNIXProcess.access$900(UNIXProcess.java:17)
at java.lang.UNIXProcess$2$1.run(UNIXProcess.java:86)
Locked ownable synchronizers:
- None
"Flushing thread" daemon prio=5 tid=1030a3800 nid=0x114add000 waiting on condition [114adc000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c9733f80> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:842)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1178)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
at com.intellij.util.indexing.MapIndexStorage.flush(MapIndexStorage.java:108)
at com.intellij.util.indexing.MemoryIndexStorage.flush(MemoryIndexStorage.java:97)
at com.intellij.util.indexing.MapReduceIndex.flush(MapReduceIndex.java:96)
at com.intellij.util.indexing.FileBasedIndex.flushAllIndices(FileBasedIndex.java:652)
at com.intellij.util.indexing.FileBasedIndex.access$1200(FileBasedIndex.java:95)
at com.intellij.util.indexing.FileBasedIndex$7.run(FileBasedIndex.java:332)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- <7c8fdead0> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
"Poller SunPKCS11-Darwin" daemon prio=1 tid=1147c0000 nid=0x113cab000 waiting on condition [113caa000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at sun.security.pkcs11.SunPKCS11$TokenPoller.run(SunPKCS11.java:692)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"timed reference disposer" daemon prio=2 tid=115421000 nid=0x113eb3000 waiting on condition [113eb2000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c90cff28> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"AWT-EventQueue-1 1.0#112.11, eap:true" prio=6 tid=103291000 nid=0x11224c000 in Object.wait() [11224a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c94992d0> (a com.intellij.util.concurrency.WriterPreferenceReadWriteLock$WriterLock)
at java.lang.Object.wait(Object.java:485)
at com.intellij.util.concurrency.WriterPreferenceReadWriteLock$WriterLock.acquire(WriterPreferenceReadWriteLock.java:241)
- locked <7c94992d0> (a com.intellij.util.concurrency.WriterPreferenceReadWriteLock$WriterLock)
at com.intellij.openapi.application.impl.ApplicationImpl$WriteAccessToken.<init>(ApplicationImpl.java:1127)
at com.intellij.openapi.application.impl.ApplicationImpl.acquireWriteActionLock(ApplicationImpl.java:1092)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:881)
at com.intellij.openapi.components.impl.stores.StorageUtil.save(StorageUtil.java:107)
at com.intellij.openapi.components.impl.stores.FileBasedStorage$FileSaveSession.doSave(FileBasedStorage.java:169)
at com.intellij.openapi.components.impl.stores.XmlElementStorage$MySaveSession.saveLocally(XmlElementStorage.java:426)
at com.intellij.openapi.components.impl.stores.XmlElementStorage$MySaveSession.save(XmlElementStorage.java:418)
at com.intellij.openapi.components.impl.stores.CompoundSaveSession.save(CompoundSaveSession.java:52)
at com.intellij.openapi.components.impl.stores.StateStorageManagerImpl$MySaveSession.save(StateStorageManagerImpl.java:511)
at com.intellij.openapi.components.impl.stores.ComponentStoreImpl$SaveSessionImpl.save(ComponentStoreImpl.java:436)
at com.intellij.openapi.components.impl.stores.ProjectStoreImpl$ProjectSaveSession.save(ProjectStoreImpl.java:508)
at com.intellij.openapi.components.impl.stores.StoreUtil.doSave(StoreUtil.java:31)
at com.intellij.openapi.project.impl.ProjectImpl.save(ProjectImpl.java:323)
at com.intellij.ide.SaveAndSyncHandler.saveProjectsAndDocuments(SaveAndSyncHandler.java:134)
at com.intellij.ide.SaveAndSyncHandler$3.onFrameDeactivated(SaveAndSyncHandler.java:91)
at com.intellij.ide.FrameStateManagerImpl.fireDeactivationEvent(FrameStateManagerImpl.java:100)
at com.intellij.ide.FrameStateManagerImpl.access$500(FrameStateManagerImpl.java:31)
at com.intellij.ide.FrameStateManagerImpl$2$1.run(FrameStateManagerImpl.java:72)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:230)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:333)
- locked <7c9051c70> (a java.lang.Object)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:534)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:416)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:374)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Locked ownable synchronizers:
- None
"Periodic tasks thread" daemon prio=5 tid=10319c800 nid=0x108bb0000 runnable [108baf000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c8d17468> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"AWT-Shutdown" prio=5 tid=103378000 nid=0x110f48000 in Object.wait() [110f47000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c8d175a0> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:265)
- locked <7c8d175a0> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Lock thread" prio=1 tid=10324b800 nid=0x1118ee000 runnable [1118ed000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <7c8d17658> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at com.intellij.idea.SocketLock$MyRunnable.run(SocketLock.java:216)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Java2D Disposer" daemon prio=10 tid=103245800 nid=0x1116e8000 in Object.wait() [1116e7000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c8d17840> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7c8d17840> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:127)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"AWT-AppKit" daemon prio=5 tid=103377000 nid=0x7fff70d5fca0 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"DestroyJavaVM" prio=5 tid=103001800 nid=0x10255b000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"timed reference disposer" daemon prio=2 tid=103157800 nid=0x10850d000 waiting on condition [10850c000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <7c8d17a18> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:680)
Locked ownable synchronizers:
- None
"Low Memory Detector" daemon prio=5 tid=103060000 nid=0x1081b4000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"CompilerThread1" daemon prio=9 tid=10305f800 nid=0x1080b1000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"CompilerThread0" daemon prio=9 tid=10305e800 nid=0x107fae000 waiting on condition [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Signal Dispatcher" daemon prio=9 tid=10305e000 nid=0x107eab000 runnable [00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"Finalizer" daemon prio=8 tid=103044000 nid=0x107da8000 in Object.wait() [107da7000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c8d17d40> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <7c8d17d40> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
Locked ownable synchronizers:
- None
"Reference Handler" daemon prio=10 tid=103043800 nid=0x107ca5000 in Object.wait() [107ca4000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <7c8d17170> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <7c8d17170> (a java.lang.ref.Reference$Lock)
Locked ownable synchronizers:
- None
"VM Thread" prio=9 tid=103041000 nid=0x107ba2000 runnable
"VM Periodic Task Thread" prio=10 tid=10306a000 nid=0x1082b7000 waiting on condition
"Exception Catcher Thread" prio=10 tid=103002000 nid=0x102c98000 runnable
JNI global references: 6703
Found one Java-level deadlock:
=============================
"JobScheduler pool 0/1":
waiting to lock monitor 100d58420 (object 7c9734008, a com.intellij.util.io.PersistentBTreeEnumerator),
which is held by "ApplicationImpl pooled thread 0 [ReadAccessToken]"
"ApplicationImpl pooled thread 0 [ReadAccessToken]":
waiting to lock monitor 1008a8768 (object 7c9733fa0, a com.intellij.util.indexing.ValueContainerMap),
which is held by "JobScheduler pool 0/1"
Java stack information for the threads listed above:
===================================================
"JobScheduler pool 0/1":
at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:339)
- waiting to lock <7c9734008> (a com.intellij.util.io.PersistentBTreeEnumerator)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:77)
at com.intellij.util.indexing.MapIndexStorage$1$1.compute(MapIndexStorage.java:67)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:134)
- locked <7c9733fa0> (a com.intellij.util.indexing.ValueContainerMap)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:98)
at com.intellij.util.indexing.FileBasedIndex.processValuesImpl(FileBasedIndex.java:900)
at com.intellij.util.indexing.FileBasedIndex.getValues(FileBasedIndex.java:822)
at com.intellij.javascript.flex.css.FlexCssElementDescriptorProvider.getPropertyDescriptor(FlexCssElementDescriptorProvider.java:180)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getPropertyDescriptor(CssDescriptorsUtil.java:50)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getCannonicalPropertyName(CssDescriptorsUtil.java:98)
at com.intellij.psi.css.impl.util.table.CssDescriptorsUtil.getCannonicalPropertyName(CssDescriptorsUtil.java:104)
at com.intellij.psi.css.browse.CssColorAnnotator.annotate(CssColorAnnotator.java:105)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:157)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:100)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$8.run(GeneralHighlightingPass.java:593)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:771)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$3600(GeneralHighlightingPass.java:80)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$10.run(GeneralHighlightingPass.java:777)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:84)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:774)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:639)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:204)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1034)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
"ApplicationImpl pooled thread 0 [ReadAccessToken]":
at com.intellij.util.indexing.ChangeTrackingValueContainer.getMergedData(ChangeTrackingValueContainer.java:127)
- waiting to lock <7c9733fa0> (a com.intellij.util.indexing.ValueContainerMap)
at com.intellij.util.indexing.ChangeTrackingValueContainer.getValueIterator(ChangeTrackingValueContainer.java:98)
at com.intellij.util.indexing.FileBasedIndex.processValuesImpl(FileBasedIndex.java:887)
at com.intellij.util.indexing.FileBasedIndex.processValues(FileBasedIndex.java:860)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector$1.process(LibraryStyleInfoCollector.java:42)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector$1.process(LibraryStyleInfoCollector.java:39)
at com.intellij.util.indexing.MemoryIndexStorage$1.process(MemoryIndexStorage.java:118)
at com.intellij.util.io.PersistentEnumeratorBase.iterateData(PersistentEnumeratorBase.java:373)
- locked <7c8fd4558> (a com.intellij.util.io.PagedFileStorage$StorageLock)
at com.intellij.util.io.PersistentHashMap.processKeys(PersistentHashMap.java:318)
- locked <7c9734008> (a com.intellij.util.io.PersistentBTreeEnumerator)
at com.intellij.util.indexing.MapIndexStorage.processKeys(MapIndexStorage.java:173)
at com.intellij.util.indexing.MemoryIndexStorage.processKeys(MemoryIndexStorage.java:126)
at com.intellij.util.indexing.MapReduceIndex.processAllKeys(MapReduceIndex.java:164)
at com.intellij.util.indexing.FileBasedIndex.processAllKeys(FileBasedIndex.java:688)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.collectInherited(LibraryStyleInfoCollector.java:39)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.consume(LibraryStyleInfoCollector.java:73)
at com.intellij.flex.uiDesigner.libraries.LibraryStyleInfoCollector.consume(LibraryStyleInfoCollector.java:19)
at com.intellij.flex.uiDesigner.libraries.LibraryManager.createOriginalLibrary(LibraryManager.java:268)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.addLibrary(LibraryCollector.java:243)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.collectFromSdkOrderEntry(LibraryCollector.java:223)
at com.intellij.flex.uiDesigner.libraries.LibraryCollector.collect(LibraryCollector.java:138)
at com.intellij.flex.uiDesigner.libraries.LibraryManager.initLibrarySets(LibraryManager.java:95)
at com.intellij.flex.uiDesigner.DesignerApplicationLauncher$7.call(DesignerApplicationLauncher.java:376)
at com.intellij.flex.uiDesigner.DesignerApplicationLauncher$7.call(DesignerApplicationLauncher.java:364)
at com.intellij.openapi.application.impl.ApplicationImpl$7.call(ApplicationImpl.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:137)
Found 1 deadlock.
@@ -0,0 +1,485 @@
2010-08-06 14:12:30
Full thread dump Java HotSpot(TM) Client VM (14.3-b01 mixed mode):
"Alarm pool(own)" prio=4 tid=0x366df000 nid=0x118 waiting on condition [0x357ef000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0f307a88> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Alarm pool(own)" prio=4 tid=0x36659800 nid=0xd90 waiting on condition [0x3597f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0eacca98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Alarm pool(own)" prio=4 tid=0x36493400 nid=0x968 waiting on condition [0x36eff000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05a52698> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Alarm pool(own)" prio=4 tid=0x361b2400 nid=0x5cc waiting on condition [0x35cbf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05a52ab0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"SimpleTimer" daemon prio=2 tid=0x34bf6400 nid=0x928 in Object.wait() [0x3579f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <0x07c96db0> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
"Swing-Shell" daemon prio=6 tid=0x36377400 nid=0xbe8 waiting on condition [0x384cf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x06fda8c0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:458)
at java.lang.Thread.run(Thread.java:619)
"JobScheduler pool 0/1" prio=6 tid=0x34abe000 nid=0xb2c waiting on condition [0x3847f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x06f32b38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:220)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"ApplicationImpl pooled thread" prio=4 tid=0x34b3ac00 nid=0x8a8 waiting on condition [0x3842f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"ApplicationImpl pooled thread" prio=4 tid=0x36481000 nid=0x8a0 waiting on condition [0x383df000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"Change List Updater" prio=2 tid=0x34447c00 nid=0x900 waiting on condition [0x36fff000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x06381570> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:160)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Timer-0" daemon prio=6 tid=0x34be7400 nid=0x8fc in Object.wait() [0x36faf000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x06eb0558> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:485)
at java.util.TimerThread.mainLoop(Timer.java:483)
- locked <0x06eb0558> (a java.util.TaskQueue)
at java.util.TimerThread.run(Timer.java:462)
"ApplicationImpl pooled thread" prio=4 tid=0x361b5c00 nid=0x878 waiting on condition [0x35c6f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"Alarm pool(own)" prio=4 tid=0x3600cc00 nid=0x89c waiting on condition [0x36eaf000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05a52dd8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"ApplicationImpl pooled thread" prio=4 tid=0x34e45000 nid=0x8ac waiting on condition [0x36e5f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"Progress Cancel Checker" prio=10 tid=0x34e55400 nid=0xa1c waiting on condition [0x35e2f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:62)
"ApplicationImpl pooled thread" prio=4 tid=0x34ce1400 nid=0x9dc waiting on condition [0x35ddf000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"Alarm pool(shared)" prio=4 tid=0x34e52800 nid=0x8e8 waiting on condition [0x35d0f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05332d60> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"TimerQueue" daemon prio=6 tid=0x34e3f800 nid=0x948 in Object.wait() [0x3574f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at javax.swing.TimerQueue.run(TimerQueue.java:232)
- locked <0x05e08120> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:619)
"Exe4JStartupThread" daemon prio=6 tid=0x34ab9800 nid=0x4f0 waiting on condition [0x356ef000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.exe4j.Controller$StartupThread.run(Unknown Source)
"FS Synchronizer" prio=6 tid=0x34e48400 nid=0xf64 waiting for monitor entry [0x3569f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.intellij.openapi.vfs.impl.local.FileWatcher.getDirtyPaths(FileWatcher.java:114)
- waiting to lock <0x0595ae40> (a java.lang.Object)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.b(LocalFileSystemImpl.java:189)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.markSuspicousFilesDirty(LocalFileSystemImpl.java:230)
at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.scan(RefreshSessionImpl.java:86)
at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl$1.run(RefreshQueueImpl.java:74)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
"XML-RPC Weblistener" prio=4 tid=0x34c0e400 nid=0x8dc runnable [0x35fdf000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x05a73d90> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.xmlrpc.WebServer.run(WebServer.java:453)
at java.lang.Thread.run(Thread.java:619)
"Performance watcher" prio=2 tid=0x34d0c400 nid=0x8cc waiting on condition [0x35f8f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05a73eb8> (a java.util.concurrent.Semaphore$NonfairSync)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:947)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1239)
at java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:383)
at com.intellij.diagnostic.PerformanceWatcher.c(PerformanceWatcher.java:158)
at com.intellij.diagnostic.PerformanceWatcher.access$100(PerformanceWatcher.java:42)
at com.intellij.diagnostic.PerformanceWatcher$2.run(PerformanceWatcher.java:116)
at java.lang.Thread.run(Thread.java:619)
"ApplicationImpl pooled thread" prio=4 tid=0x34434400 nid=0x898 waiting on condition [0x35f3f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05337e08> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:424)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:874)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:945)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:125)
"StoreRefreshStatusThread" daemon prio=2 tid=0x34c1e400 nid=0x1dc waiting for monitor entry [0x353df000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.intellij.openapi.vfs.impl.local.FileWatcher.getDirtyPaths(FileWatcher.java:114)
- waiting to lock <0x0595ae40> (a java.lang.Object)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.b(LocalFileSystemImpl.java:189)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.access$200(LocalFileSystemImpl.java:43)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl$StoreRefreshStatusThread.run(LocalFileSystemImpl.java:297)
"WatchForChangesThread" prio=6 tid=0x34a84800 nid=0x1c8 waiting for monitor entry [0x352bf000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.intellij.openapi.vfs.impl.local.FileWatcher.a(FileWatcher.java:185)
- waiting to lock <0x0595ae40> (a java.lang.Object)
at com.intellij.openapi.vfs.impl.local.FileWatcher.access$700(FileWatcher.java:49)
at com.intellij.openapi.vfs.impl.local.FileWatcher$WatchForChangesThread.run(FileWatcher.java:271)
"AWT-EventQueue-1 9.0.3#IU-95.474, eap:false" prio=6 tid=0x34d52000 nid=0xc1c runnable [0x3547e000]
java.lang.Thread.State: RUNNABLE
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
- locked <0x059661a8> (a java.io.BufferedOutputStream)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:278)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
- locked <0x059661d0> (a java.io.OutputStreamWriter)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
- locked <0x059661d0> (a java.io.OutputStreamWriter)
at com.intellij.openapi.vfs.impl.local.FileWatcher.b(FileWatcher.java:344)
at com.intellij.openapi.vfs.impl.local.FileWatcher.setWatchRoots(FileWatcher.java:159)
- locked <0x0595ae40> (a java.lang.Object)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl$2.run(LocalFileSystemImpl.java:272)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:697)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.c(LocalFileSystemImpl.java:255)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.removeWatchedRoots(LocalFileSystemImpl.java:402)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.d(ProjectRootManagerImpl.java:669)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.c(ProjectRootManagerImpl.java:542)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.access$100(ProjectRootManagerImpl.java:70)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.fireChange(ProjectRootManagerImpl.java:135)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl$BatchSession.rootsChanged(ProjectRootManagerImpl.java:148)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.makeRootsChange(ProjectRootManagerImpl.java:469)
at com.intellij.openapi.module.impl.ModuleManagerImpl.a(ModuleManagerImpl.java:894)
at com.intellij.openapi.module.impl.ModuleManagerImpl.access$2000(ModuleManagerImpl.java:73)
at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.commitWithRunnable(ModuleManagerImpl.java:800)
at com.intellij.openapi.module.impl.ModuleManagerImpl.commitModelWithRunnable(ModuleManagerImpl.java:567)
at com.intellij.openapi.roots.impl.ModuleRootManagerImpl.multiCommit(ModuleRootManagerImpl.java:304)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.multiCommit(ProjectRootManagerImpl.java:242)
at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.commit(ModuleManagerImpl.java:796)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createAndCommitIfNeeded(ModuleBuilder.java:152)
at com.intellij.ide.util.projectWizard.ModuleBuilder$2.compute(ModuleBuilder.java:202)
at com.intellij.ide.util.projectWizard.ModuleBuilder$2.compute(ModuleBuilder.java:199)
at com.intellij.openapi.application.impl.ApplicationImpl$11.run(ApplicationImpl.java:774)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:754)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:772)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commitModule(ModuleBuilder.java:199)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commit(ModuleBuilder.java:186)
at com.intellij.ide.impl.NewProjectUtil.createNewProject(NewProjectUtil.java:135)
at com.intellij.ide.actions.NewProjectAction.actionPerformed(NewProjectAction.java:29)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreen$ActionGroupDescriptor$3.onPress(WelcomeScreen.java:215)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreen$ButtonWithExtension.onPress(WelcomeScreen.java:829)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreen$ActionGroupDescriptor$2.mouseClicked(WelcomeScreen.java:151)
at java.awt.Component.processMouseEvent(Component.java:6266)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:504)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
"timed reference disposer" prio=2 tid=0x34447400 nid=0xe18 waiting on condition [0x3538f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05605ef0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Periodic tasks thread" prio=6 tid=0x34438400 nid=0x95c waiting on condition [0x349cf000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x05327fc0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"AWT-Shutdown" prio=6 tid=0x343e0c00 nid=0xce8 in Object.wait() [0x3526f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0x052c79c0> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:619)
"SocketListenerThread" prio=2 tid=0x348df400 nid=0xcdc runnable [0x3521f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x052ca190> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
- locked <0x052ca190> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:712)
- locked <0x052ca1d0> (a java.net.DatagramPacket)
- locked <0x052ca1f0> (a java.net.MulticastSocket)
at com.intellij.a.e.a.e.a(e.java:57)
at com.intellij.a.e.a.f.run(f.java:25)
"SocketListenerThread" prio=2 tid=0x34783800 nid=0xcd8 runnable [0x351cf000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x052cc9e0> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
- locked <0x052cc9e0> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:712)
- locked <0x052cca20> (a java.net.DatagramPacket)
- locked <0x052cca40> (a java.net.DatagramSocket)
at com.intellij.a.e.a.e.a(e.java:57)
at com.intellij.a.e.a.f.run(f.java:25)
"MessageDeliveryThread" prio=6 tid=0x34793400 nid=0xcd4 in Object.wait() [0x3517f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x052ccaf0> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at com.intellij.a.e.i.run(i.java:26)
- locked <0x052ccaf0> (a java.lang.Object)
"AWT-Windows" daemon prio=6 tid=0x34424800 nid=0xb88 runnable [0x34f9f000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:291)
at java.lang.Thread.run(Thread.java:619)
"Java2D Disposer" daemon prio=10 tid=0x348e4400 nid=0xb68 in Object.wait() [0x34eff000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x052ccbc8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:125)
at java.lang.Thread.run(Thread.java:619)
"Lock thread" prio=2 tid=0x34875400 nid=0x780 runnable [0x34a1f000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
- locked <0x0523cc30> (a java.net.SocksSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at com.intellij.idea.SocketLock$MyRunnable.run(SocketLock.java:191)
at java.lang.Thread.run(Thread.java:619)
"timed reference disposer" prio=2 tid=0x3476e400 nid=0xac4 waiting on condition [0x3497f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x051e5ee8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
"Exe4JStartupThread" daemon prio=6 tid=0x34420800 nid=0xac0 waiting on condition [0x3472f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at com.exe4j.Controller$StartupThread.run(Unknown Source)
"Low Memory Detector" daemon prio=6 tid=0x343f2400 nid=0xa9c runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"CompilerThread0" daemon prio=10 tid=0x343ec000 nid=0xa98 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=10 tid=0x343ea800 nid=0xa94 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x343e9400 nid=0xa90 runnable [0x00000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=8 tid=0x343da000 nid=0xa78 in Object.wait() [0x3454f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x051c0478> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x343d5400 nid=0xa74 in Object.wait() [0x344ff000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x051c00a8> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x003c7c00 nid=0x944 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
"VM Thread" prio=10 tid=0x343d1400 nid=0xa70 runnable
"VM Periodic Task Thread" prio=10 tid=0x3440dc00 nid=0xabc waiting on condition
JNI global references: 2764
@@ -132,4 +132,57 @@ public class AdvHighlightingJdk7Test extends DaemonAnalyzerTestCase {
public void testAmbiguousMultipleTypeParamExtends3() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA57317() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA57278() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA57269() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA67573() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA57306() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA57535() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA67832() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA67837() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA78027() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA25097() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA24768() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA21660() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousIDEA22547() throws Exception {
doTestAmbiguous();
}
}
@@ -39,6 +39,8 @@ public class RedundantCast15Test extends InspectionTestCase {
public void testRawCast() throws Exception { doTest();}
public void testRawCastsToAvoidIncompatibility() throws Exception { doTest();}
public void testIDEA22899() throws Exception { doTest();}
public void testTypeParameterAccessChecksJava7() throws Exception {
final JavaVersionServiceImpl versionService = (JavaVersionServiceImpl)JavaVersionService.getInstance();
@@ -0,0 +1,79 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.unscramble;
import com.intellij.JavaTestUtil;
import com.intellij.execution.ui.RunContentDescriptor;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
import javax.swing.*;
import java.io.File;
/**
* @author Dmitry Avdeev
* Date: 4/9/12
*/
public class UnscrambleDialogTest extends JavaCodeInsightFixtureTestCase {
public void testStacktrace() throws Exception {
RunContentDescriptor content = showText("");
Icon icon = content.getIcon();
String name = content.getDisplayName();
assertEquals(null, icon);
assertEquals("<Stacktrace>", name);
}
public void testException() throws Exception {
RunContentDescriptor content = showText("java.lang.NullPointerException\n" +
"\tat com.intellij.psi.css.resolve.impl.XhtmlFileInfo.findOneStyleSheet(XhtmlFileInfo.java:291)\n" +
"\tat com.intellij.psi.css.resolve.impl.XhtmlFileInfo.getStylesheets(XhtmlFileInfo.java:174)\n" +
"\tat com.intellij.psi.css.resolve.impl.XhtmlFileInfo.initStylesheets(XhtmlFileInfo.java:119)");
assertIcon("exception.png", content.getIcon());
assertEquals("NPE", content.getDisplayName());
}
public void testThreadDump() throws Exception {
File file = new File(getTestDataPath() + "threaddump.txt");
String s = FileUtil.loadFile(file);
RunContentDescriptor content = showText(s);
assertIcon("threaddump.png", content.getIcon());
assertEquals("<Threads>", content.getDisplayName());
}
public void testDeadlock() throws Exception {
File file = new File(getTestDataPath() + "deadlock.txt");
String s = FileUtil.loadFile(file);
RunContentDescriptor content = showText(s);
assertIcon("killProcess.png", content.getIcon());
assertEquals("<Deadlock>", content.getDisplayName());
}
private RunContentDescriptor showText(String unscramble) {
RunContentDescriptor descriptor = UnscrambleDialog.showUnscrambledText(null, "foo", getProject(), unscramble);
assertNotNull(descriptor);
return descriptor;
}
private static void assertIcon(String s, Icon icon) {
assertTrue(icon.toString().contains(s));
}
@Override
protected String getBasePath() {
return JavaTestUtil.getRelativeJavaTestDataPath() + "/unscramble/";
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -70,7 +70,7 @@ public abstract class CustomFoldingBuilder extends FoldingBuilderEx implements D
ASTNode startNode = localFoldingStack.pop();
int startOffset = startNode.getTextRange().getStartOffset();
TextRange range = new TextRange(startOffset, child.getTextRange().getEndOffset());
descriptors.add(new FoldingDescriptor(localFoldingStack.getOwner(), range));
descriptors.add(new FoldingDescriptor(startNode, range));
}
}
else {
@@ -83,15 +83,11 @@ public abstract class CustomFoldingBuilder extends FoldingBuilderEx implements D
@Override
public final String getPlaceholderText(@NotNull ASTNode node, @NotNull TextRange range) {
if (isCustomFoldingRoot(node)) {
PsiFile file = node.getPsi().getContainingFile();
PsiElement contextElement = file.findElementAt(range.getStartOffset());
if (contextElement != null && isCustomFoldingCandidate(contextElement.getNode())) {
String elementText = contextElement.getText();
CustomFoldingProvider defaultProvider = getDefaultProvider(elementText);
if (defaultProvider != null && defaultProvider.isCustomRegionStart(elementText)) {
return defaultProvider.getPlaceholderText(elementText);
}
if (isCustomFoldingCandidate(node)) {
String elementText = node.getText();
CustomFoldingProvider defaultProvider = getDefaultProvider(elementText);
if (defaultProvider != null && defaultProvider.isCustomRegionStart(elementText)) {
return defaultProvider.getPlaceholderText(elementText);
}
}
return getLanguagePlaceholderText(node, range);
@@ -204,13 +204,14 @@ public class LineMarkersPass extends ProgressableTextEditorHighlightingPass impl
final List<LineMarkerInfo> injectedMarkers = new ArrayList<LineMarkerInfo>();
final Set<PsiFile> injectedFiles = new THashSet<PsiFile>();
for (PsiElement element : elements) {
InjectedLanguageUtil.enumerate(element, file, false, new PsiLanguageInjectionHost.InjectedPsiVisitor() {
@Override
public void visit(@NotNull final PsiFile injectedPsi, @NotNull List<PsiLanguageInjectionHost.Shred> places) {
injectedFiles.add(injectedPsi);
}
});
final PsiLanguageInjectionHost.InjectedPsiVisitor collectingVisitor = new PsiLanguageInjectionHost.InjectedPsiVisitor() {
@Override
public void visit(@NotNull final PsiFile injectedPsi, @NotNull List<PsiLanguageInjectionHost.Shred> places) {
injectedFiles.add(injectedPsi);
}
};
for (int i = 0, size = elements.size(); i < size; ++i) {
InjectedLanguageUtil.enumerate(elements.get(i), file, false, collectingVisitor);
}
for (PsiFile injectedPsi : injectedFiles) {
final Project project = injectedPsi.getProject();
@@ -120,6 +120,10 @@ public abstract class RefElementImpl extends RefEntityImpl implements RefElement
return myID.getContainingFile();
}
public VirtualFile getVirtualFile() {
return myID.getVirtualFile();
}
public SmartPsiElementPointer getPointer() {
return myID;
}
@@ -36,8 +36,8 @@ import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.PathMacroManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.extensions.ExtensionPoint;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectUtil;
@@ -49,6 +49,7 @@ import com.intellij.psi.*;
import com.intellij.psi.impl.light.LightElement;
import com.intellij.util.concurrency.JBReentrantReadWriteLock;
import com.intellij.util.concurrency.LockFactory;
import com.intellij.util.containers.ContainerUtil;
import gnu.trove.THashMap;
import org.jdom.Element;
import org.jetbrains.annotations.Nullable;
@@ -101,8 +102,7 @@ public class RefManagerImpl extends RefManager {
public void iterate(RefVisitor visitor) {
myLock.readLock().lock();
try {
final THashMap<PsiAnchor, RefElement> refTable = getRefTable();
for (RefElement refElement : refTable.values()) {
for (RefElement refElement : getSortedElements()) {
refElement.accept(visitor);
}
if (myModules != null) {
@@ -303,6 +303,21 @@ public class RefManagerImpl extends RefManager {
return myRefTable;
}
public ArrayList<RefElement> getSortedElements() {
ArrayList<RefElement> answer = new ArrayList<RefElement>(myRefTable.values());
ContainerUtil.quickSort(answer, new Comparator<RefElement>() {
@Override
public int compare(RefElement o1, RefElement o2) {
VirtualFile v1 = ((RefElementImpl)o1).getVirtualFile();
VirtualFile v2 = ((RefElementImpl)o2).getVirtualFile();
return (v1 != null ? v1.hashCode() : 0) - (v2 != null ? v2.hashCode() : 0);
}
});
return answer;
}
@Override
public PsiManager getPsiManager() {
return myPsiManager;
@@ -16,7 +16,6 @@
package com.intellij.unscramble;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.ide.IdeBundle;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
@@ -49,9 +48,7 @@ public class AnalyzeStacktraceDialog extends DialogWrapper {
@Override
protected void doOKAction() {
final ConsoleView consoleView = AnalyzeStacktraceUtil.addConsole(myProject, null, "<Stacktrace>");
consoleView.allowHeavyFilters();
AnalyzeStacktraceUtil.printStacktrace(consoleView, myEditorPanel.getText());
AnalyzeStacktraceUtil.addConsole(myProject, null, "<Stacktrace>", myEditorPanel.getText());
super.doOKAction();
}
@@ -17,7 +17,6 @@
package com.intellij.unscramble;
import com.intellij.diagnostic.IdeErrorsDialog;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DataContext;
@@ -37,9 +36,7 @@ public class AnalyzeStacktraceOnErrorAction extends AnAction {
final String message = IdeErrorsDialog.CURRENT_TRACE_KEY.getData(dataContext);
if (message != null) {
final ConsoleView consoleView = AnalyzeStacktraceUtil.addConsole(project, null, "<Stacktrace>");
consoleView.allowHeavyFilters();
AnalyzeStacktraceUtil.printStacktrace(consoleView, message);
AnalyzeStacktraceUtil.addConsole(project, null, "<Stacktrace>", message);
}
}
}
@@ -82,7 +82,15 @@ public class AnalyzeStacktraceUtil {
JComponent createConsoleComponent(ConsoleView consoleView, DefaultActionGroup toolbarActions);
}
public static ConsoleView addConsole(Project project, @Nullable ConsoleFactory consoleFactory, final String tabTitle) {
public static void addConsole(Project project, @Nullable ConsoleFactory consoleFactory, final String tabTitle, String text) {
addConsole(project, consoleFactory, tabTitle, text, null);
}
public static RunContentDescriptor addConsole(Project project,
@Nullable ConsoleFactory consoleFactory,
final String tabTitle,
String text,
@Nullable Icon icon) {
final TextConsoleBuilder builder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
for(Filter filter: Extensions.getExtensions(EP_NAME, project)) {
builder.addFilter(filter);
@@ -94,7 +102,7 @@ public class AnalyzeStacktraceUtil {
? consoleFactory.createConsoleComponent(consoleView, toolbarActions)
: new MyConsolePanel(consoleView, toolbarActions);
final RunContentDescriptor descriptor =
new RunContentDescriptor(consoleView, null, consoleComponent, tabTitle) {
new RunContentDescriptor(consoleView, null, consoleComponent, tabTitle, icon) {
public boolean isContentReuseProhibited() {
return true;
}
@@ -106,7 +114,9 @@ public class AnalyzeStacktraceUtil {
toolbarActions.add(action);
}
ExecutionManager.getInstance(project).getContentManager().showRunContent(executor, descriptor);
return consoleView;
consoleView.allowHeavyFilters();
printStacktrace(consoleView, text);
return descriptor;
}
private static final class MyConsolePanel extends JPanel {
@@ -439,14 +439,14 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener,
if (column < 0) {
if (debugBuffer != null) {
debugBuffer.append("Resetting target logical column to zero as it is negative (" + column + ")\n");
debugBuffer.append("Resetting target logical column to zero as it is negative (").append(column).append(")\n");
}
column = 0;
softWrapColumns = 0;
}
if (line < 0) {
if (debugBuffer != null) {
debugBuffer.append("Resetting target logical line to zero as it is negative (" + line + ")\n");
debugBuffer.append("Resetting target logical line to zero as it is negative (").append(line).append(")\n");
}
line = 0;
softWrapLinesBefore = 0;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,9 +15,11 @@
*/
package com.intellij.openapi.editor.impl.softwrap.mapping;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.*;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.openapi.editor.ex.FoldingModelEx;
import com.intellij.openapi.editor.impl.EditorImpl;
import com.intellij.openapi.editor.impl.EditorTextRepresentationHelper;
import com.intellij.openapi.editor.impl.softwrap.SoftWrapDataMapper;
import com.intellij.openapi.editor.impl.softwrap.SoftWrapImpl;
@@ -54,7 +56,8 @@ import java.util.List;
* @since Aug 31, 2010 10:24:47 AM
*/
public class CachingSoftWrapDataMapper implements SoftWrapDataMapper, SoftWrapAwareDocumentParsingListener {
private static final Logger LOG = Logger.getInstance("#" + CachingSoftWrapDataMapper.class.getName());
private static final boolean DEBUG_SOFT_WRAP_PROCESSING = false;
/** Caches information for the document visual line starts sorted in ascending order. */
@@ -445,6 +448,30 @@ public class CachingSoftWrapDataMapper implements SoftWrapDataMapper, SoftWrapAw
myCache.addAll(myNotAffectedByUpdateTailCacheEntries);
}
applyStateChange(exactOffsetsDiff);
// TODO den remove before v.12 release
if (myCache.size() > 1) {
CacheEntry beforeLast = myCache.get(myCache.size() - 2);
CacheEntry last = myCache.get(myCache.size() - 1);
if (beforeLast.visualLine == last.visualLine
|| (beforeLast.visualLine + 1 == last.visualLine && last.startOffset - beforeLast.endOffset > 1)
|| last.startOffset > myEditor.getDocument().getTextLength())
{
CharSequence editorState = "";
if (myEditor instanceof EditorImpl) {
editorState = ((EditorImpl)myEditor).dumpState();
}
LOG.error(
"Detected invalid soft wraps cache update",
String.format(
"Event: %s, normal: %b.%n%nTail cache entries: %s%n%nAffected by change cache entries: %s%n%nBefore change state: %s%n%n"
+ "After change state: %s%n%nEditor state: %s",
event, normal, myNotAffectedByUpdateTailCacheEntries, myAffectedByUpdateCacheEntries,
myBeforeChangeState, myAfterChangeState, editorState
)
);
}
}
myAffectedByUpdateCacheEntries.clear();
myNotAffectedByUpdateTailCacheEntries.clear();
@@ -610,14 +637,24 @@ public class CachingSoftWrapDataMapper implements SoftWrapDataMapper, SoftWrapAw
public void rawAdd(int visualLine,
int startOffset,
int endOffset,
int startLogicalLine,
int startLogicalColumn,
int endLogicalLine,
int endLogicalColumn,
int endVisualColumn,
@NotNull List<Trinity<Integer, Integer, FoldRegion>> foldRegions,
@NotNull List<Pair<Integer, Integer>> tabData)
{
final CacheEntry entry = new CacheEntry(visualLine, myEditor, myRepresentationHelper);
entry.startOffset = startOffset;
entry.endOffset = endOffset;
entry.startLogicalLine = myEditor.getDocument().getLineNumber(startOffset);
entry.endLogicalLine = myEditor.getDocument().getLineNumber(endOffset);
entry.startLogicalLine = startLogicalLine;
assert startLogicalLine == myEditor.getDocument().getLineNumber(startOffset);
entry.startLogicalColumn = startLogicalColumn;
entry.endLogicalLine = endLogicalLine;
assert endLogicalLine == myEditor.getDocument().getLineNumber(endOffset);
entry.endLogicalColumn = endLogicalColumn;
entry.endVisualColumn = endVisualColumn;
for (Trinity<Integer, Integer, FoldRegion> region : foldRegions) {
final FoldingData foldData = new FoldingData(region.third, region.second, myRepresentationHelper, myEditor);
foldData.widthInColumns = region.first;
@@ -107,24 +107,27 @@ public class FileChooserDialogImpl extends DialogWrapper implements FileChooserD
@Override
@NotNull
public VirtualFile[] choose(@Nullable VirtualFile toSelect, Project project) {
prepareAndShow(toSelect != null ? toSelect : null, project);
if (myProject == null && project != null) {
myProject = project;
}
prepareAndShow(toSelect);
return myChosenFiles;
}
@Override
public void choose(@Nullable VirtualFile toSelect, @NotNull Consumer<List<VirtualFile>> callback) {
prepareAndShow(toSelect, myProject);
prepareAndShow(toSelect);
if (myChosenFiles.length > 0) {
callback.consume(Arrays.asList(myChosenFiles));
}
}
private void prepareAndShow(@Nullable VirtualFile toSelect, @Nullable Project project) {
if (myProject == null && project != null) myProject = project;
private void prepareAndShow(@Nullable VirtualFile toSelect) {
init();
final VirtualFile lastOpenedFile = FileChooserUtil.getLastOpenedFile(myProject);
final VirtualFile file = FileChooserUtil.getFileToSelect(myChooserDescriptor, project, toSelect, lastOpenedFile);
final VirtualFile file = FileChooserUtil.getFileToSelect(myChooserDescriptor, myProject, toSelect, lastOpenedFile);
if (file != null && file.isValid()) {
myFileSystemTree.select(file, new Runnable() {
@@ -349,10 +349,10 @@ public final class ToolWindowImpl implements ToolWindowEx {
public final void setIcon(final Icon icon) {
ApplicationManager.getApplication().assertIsDispatchThread();
if (!(icon instanceof LayeredIcon) && (icon.getIconHeight() != 13 || icon.getIconWidth() != 13)) {
final Icon oldIcon = getIcon();
if (oldIcon != icon && !(icon instanceof LayeredIcon) && (icon.getIconHeight() != 13 || icon.getIconWidth() != 13)) {
LOG.warn("ToolWindow icons should be 13x13. Please fix " + icon);
}
final Icon oldIcon = getIcon();
getSelectedContent().setIcon(icon);
myIcon = icon;
myChangeSupport.firePropertyChange(PROP_ICON, oldIcon, icon);
@@ -0,0 +1,29 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.platform;
import org.jetbrains.annotations.NotNull;
/**
* Inheritors of {@link DirectoryProjectGenerator} should implement this interface to be filtered out in some IDE.
*
* @author Sergey Simonchik
*/
public interface DirectoryProjectGeneratorProductAware {
boolean isSuitableForProduct(@NotNull String productName);
}
@@ -58,6 +58,10 @@ import java.awt.image.BufferedImage;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import static java.awt.event.KeyEvent.KEY_PRESSED;
import static java.awt.event.MouseEvent.MOUSE_CLICKED;
import static java.awt.event.MouseEvent.MOUSE_PRESSED;
public class BalloonImpl implements Balloon, IdeTooltip.Ui {
private MyComponent myComp;
@@ -78,45 +82,49 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
private CloseButton myCloseRec;
private final AWTEventListener myAwtActivityListener = new AWTEventListener() {
public void eventDispatched(final AWTEvent event) {
if (myHideOnMouse &&
(event.getID() == MouseEvent.MOUSE_PRESSED)) {
final MouseEvent me = (MouseEvent)event;
if (isInsideBalloon(me)) return;
public void eventDispatched(final AWTEvent e) {
final int id = e.getID();
if (e instanceof MouseEvent) {
final MouseEvent me = (MouseEvent)e;
final boolean insideBalloon = isInsideBalloon(me);
hide();
return;
}
if (myClickHandler != null && event.getID() == MouseEvent.MOUSE_CLICKED) {
final MouseEvent me = (MouseEvent)event;
if (!(me.getComponent() instanceof CloseButton) && isInsideBalloon(me)) {
myClickHandler.actionPerformed(new ActionEvent(BalloonImpl.this, ActionEvent.ACTION_PERFORMED, "click", me.getModifiersEx()));
if (myCloseOnClick) {
if (myHideOnMouse && id == MOUSE_PRESSED) {
if (!insideBalloon) {
hide();
return;
}
return;
}
if (myClickHandler != null && id == MOUSE_CLICKED) {
if (!(me.getComponent() instanceof CloseButton) && insideBalloon) {
myClickHandler.actionPerformed(new ActionEvent(BalloonImpl.this, ActionEvent.ACTION_PERFORMED, "click", me.getModifiersEx()));
if (myCloseOnClick) {
hide();
return;
}
}
}
}
if (myEnableCloseButton && event.getID() == MouseEvent.MOUSE_MOVED) {
final MouseEvent me = (MouseEvent)event;
final boolean inside = isInsideBalloon(me);
final boolean moveChanged = inside != myLastMoveWasInsideBalloon;
myLastMoveWasInsideBalloon = inside;
if (moveChanged) {
myComp.repaintButton();
if (myEnableCloseButton && id == MouseEvent.MOUSE_MOVED) {
final boolean moveChanged = insideBalloon != myLastMoveWasInsideBalloon;
myLastMoveWasInsideBalloon = insideBalloon;
if (moveChanged) {
myComp.repaintButton();
}
}
if (UIUtil.isCloseClick((MouseEvent)e)) {
hide();
return;
}
}
if (event instanceof MouseEvent && UIUtil.isCloseClick((MouseEvent)event)) {
hide();
return;
}
if (myHideOnKey && (event.getID() == KeyEvent.KEY_PRESSED)) {
final KeyEvent ke = (KeyEvent)event;
if (ke.getKeyCode() != KeyEvent.VK_SHIFT && ke.getKeyCode() != KeyEvent.VK_CONTROL && ke.getKeyCode() != KeyEvent.VK_ALT && ke.getKeyCode() != KeyEvent.VK_META) {
if (myHideOnKey && e instanceof KeyEvent && id == KEY_PRESSED) {
final KeyEvent ke = (KeyEvent)e;
if (ke.getKeyCode() != KeyEvent.VK_SHIFT &&
ke.getKeyCode() != KeyEvent.VK_CONTROL &&
ke.getKeyCode() != KeyEvent.VK_ALT &&
ke.getKeyCode() != KeyEvent.VK_META) {
if (SwingUtilities.isDescendingFrom(ke.getComponent(), myComp) || ke.getComponent() == myComp) return;
hide();
}
@@ -524,6 +532,22 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
myLayeredPane.add(myComp);
myLayeredPane.setLayer(myComp, getLayer());
myPosition.updateBounds(this);
myComp.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
e.consume();
}
@Override
public void mousePressed(MouseEvent e) {
e.consume();
}
@Override
public void mouseReleased(MouseEvent e) {
e.consume();
}
});
}
@@ -36,8 +36,7 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.*;
import java.util.List;
/**
@@ -47,12 +46,11 @@ import java.util.List;
public class MacFileChooserDialogImpl implements PathChooserDialog {
private static final int OK = 1;
private static VirtualFile ourLastPath = null;
private static FileChooserDescriptor myChooserDescriptor;
private static List<String> myResultPaths = null;
private static Consumer<List<VirtualFile>> myCallback = null;
private static Consumer<List<VirtualFile>> myCallbackCandidate = null;
private Project myProject;
private static final Map<ID, MacFileChooserDialogImpl> ourImplMap = new HashMap<ID, MacFileChooserDialogImpl>(2);
private final FileChooserDescriptor myChooserDescriptor;
private final Project myProject;
private Consumer<List<VirtualFile>> myCallback;
private static final Callback SHOULD_ENABLE_URL = new Callback() {
@SuppressWarnings("UnusedDeclaration")
@@ -61,6 +59,7 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
}
};
/*
private static final Callback SHOULD_SHOW_FILENAME_CALLBACK = new Callback() {
@SuppressWarnings("UnusedDeclaration")
public boolean callback(ID self, String selector, ID panel, ID filename) {
@@ -82,11 +81,12 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
return virtualFile == null || (!virtualFile.isDirectory() || myChooserDescriptor.isFileSelectable(virtualFile));
}
};
*/
private static final Callback OPEN_PANEL_DID_END = new Callback() {
@SuppressWarnings("UnusedDeclaration")
public void callback(ID self, String selector, ID openPanelDidEnd, ID returnCode, ID contextInfo) {
processResult(returnCode, openPanelDidEnd);
final MacFileChooserDialogImpl impl = ourImplMap.remove(self);
try {
//noinspection SSBasedInspection
@@ -98,50 +98,50 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
}
}
});
if (myResultPaths != null && myResultPaths.size() > 0) {
final List<String> paths = myResultPaths;
final Consumer<List<VirtualFile>> callback = myCallback;
final List<String> resultPaths = processResult(returnCode, openPanelDidEnd);
if (resultPaths.size() > 0) {
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final List<VirtualFile> files = getChosenFiles(paths);
final List<VirtualFile> files = getChosenFiles(resultPaths);
if (files.size() > 0) {
setLastSelectedPath(files.get(0));
callback.consume(files);
FileChooserUtil.setLastOpenedFile(impl.myProject, files.get(files.size() - 1));
impl.myCallback.consume(files);
}
}
});
}
}
finally {
myResultPaths = null;
myCallback = null;
Foundation.cfRelease(self);
}
Foundation.cfRelease(self);
}
};
private static void processResult(final ID result, final ID panel) {
final List<String> resultFiles = new ArrayList<String>();
@NotNull
private static List<String> processResult(final ID result, final ID panel) {
final List<String> resultPaths = new ArrayList<String>();
if (result != null && OK == result.intValue()) {
ID fileNamesArray = invoke(panel, "filenames");
ID enumerator = invoke(fileNamesArray, "objectEnumerator");
final ID fileNamesArray = invoke(panel, "filenames");
final ID enumerator = invoke(fileNamesArray, "objectEnumerator");
while (true) {
final ID filename = invoke(enumerator, "nextObject");
if (filename == null || 0 == filename.intValue()) break;
String s = Foundation.toStringViaUTF8(filename);
if (s != null) {
resultFiles.add(s);
final String path = Foundation.toStringViaUTF8(filename);
if (path != null) {
resultPaths.add(path);
}
}
myResultPaths = resultFiles;
}
return resultPaths;
}
@NotNull
private static List<VirtualFile> getChosenFiles(final List<String> paths) {
if (paths == null || paths.size() == 0) return Collections.emptyList();
@@ -158,21 +158,19 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
return files;
}
private static void setLastSelectedPath(final VirtualFile selectedPath) {
ourLastPath = selectedPath;
}
private static final Callback MAIN_THREAD_RUNNABLE = new Callback() {
@SuppressWarnings("UnusedDeclaration")
public void callback(ID self, String selector, ID toSelect) {
final ID nsOpenPanel = Foundation.getObjcClass("NSOpenPanel");
final ID chooser = invoke(nsOpenPanel, "openPanel");
final FileChooserDescriptor chooserDescriptor = ourImplMap.get(self).myChooserDescriptor;
invoke(chooser, "setPrompt:", Foundation.nsString("Choose"));
invoke(chooser, "setCanChooseFiles:", myChooserDescriptor.isChooseFiles() || myChooserDescriptor.isChooseJars());
invoke(chooser, "setCanChooseDirectories:", myChooserDescriptor.isChooseFolders());
invoke(chooser, "setAllowsMultipleSelection:", myChooserDescriptor.isChooseMultiple());
invoke(chooser, "setTreatsFilePackagesAsDirectories:", myChooserDescriptor.isChooseFolders());
invoke(chooser, "setCanChooseFiles:", chooserDescriptor.isChooseFiles() || chooserDescriptor.isChooseJars());
invoke(chooser, "setCanChooseDirectories:", chooserDescriptor.isChooseFolders());
invoke(chooser, "setAllowsMultipleSelection:", chooserDescriptor.isChooseMultiple());
invoke(chooser, "setTreatsFilePackagesAsDirectories:", chooserDescriptor.isChooseFolders());
if (Foundation.isClassRespondsToSelector(nsOpenPanel, Foundation.createSelector("setCanCreateDirectories:"))) {
invoke(chooser, "setCanCreateDirectories:", true);
@@ -181,7 +179,7 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
invoke(chooser, "_setIncludeNewFolderButton:", true);
}
final Boolean showHidden = myChooserDescriptor.getUserData(PathChooserDialog.NATIVE_MAC_CHOOSER_SHOW_HIDDEN_FILES);
final Boolean showHidden = chooserDescriptor.getUserData(PathChooserDialog.NATIVE_MAC_CHOOSER_SHOW_HIDDEN_FILES);
if (Boolean.TRUE.equals(showHidden) || Registry.is("ide.mac.filechooser.showhidden.files")) {
if (Foundation.isClassRespondsToSelector(nsOpenPanel, Foundation.createSelector("setShowsHiddenFiles:"))) {
invoke(chooser, "setShowsHiddenFiles:", true);
@@ -205,7 +203,7 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
}
ID types = null;
if (!myChooserDescriptor.isChooseFiles() && myChooserDescriptor.isChooseJars()) {
if (!chooserDescriptor.isChooseFiles() && chooserDescriptor.isChooseJars()) {
types = invoke("NSArray", "arrayWithObject:", Foundation.nsString("jar"));
}
@@ -221,7 +219,6 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
final ID focusedWindow = MacUtil.findWindowForTitle(activeWindowTitle);
if (focusedWindow != null) {
myCallback = myCallbackCandidate;
invoke(chooser, "beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:",
directory, file, types, focusedWindow, self, Foundation.createSelector("openPanelDidEnd:returnCode:contextInfo:"), null);
}
@@ -233,12 +230,12 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
static {
final ID delegate = Foundation.allocateObjcClassPair(Foundation.getObjcClass("NSObject"), "NSOpenPanelDelegate_");
if (!Foundation.addMethod(delegate, Foundation.createSelector("panel:shouldShowFilename:"), SHOULD_SHOW_FILENAME_CALLBACK, "B*")) {
throw new RuntimeException("Unable to add method to objective-c delegate class!");
}
if (!Foundation.addMethod(delegate, Foundation.createSelector("panel:isValidFilename:"), IS_VALID_FILENAME_CALLBACK, "B*")) {
throw new RuntimeException("Unable to add method to objective-c delegate class!");
}
//if (!Foundation.addMethod(delegate, Foundation.createSelector("panel:shouldShowFilename:"), SHOULD_SHOW_FILENAME_CALLBACK, "B*")) {
// throw new RuntimeException("Unable to add method to objective-c delegate class!");
//}
//if (!Foundation.addMethod(delegate, Foundation.createSelector("panel:isValidFilename:"), IS_VALID_FILENAME_CALLBACK, "B*")) {
// throw new RuntimeException("Unable to add method to objective-c delegate class!");
//}
if (!Foundation.addMethod(delegate, Foundation.createSelector("showOpenPanel:"), MAIN_THREAD_RUNNABLE, "v*")) {
throw new RuntimeException("Unable to add method to objective-c delegate class!");
}
@@ -251,23 +248,23 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
Foundation.registerObjcClassPair(delegate);
}
public MacFileChooserDialogImpl(@NotNull FileChooserDescriptor chooserDescriptor, Project project) {
public MacFileChooserDialogImpl(@NotNull final FileChooserDescriptor chooserDescriptor, final Project project) {
myChooserDescriptor = chooserDescriptor;
myProject = project;
}
@Override
public void choose(@Nullable final VirtualFile toSelect, @NotNull final Consumer<List<VirtualFile>> callback) {
assert myCallback == null : "Current native file chooser should finish before next usage!";
myCallbackCandidate = callback;
myCallback = callback;
final VirtualFile selectFile = FileChooserUtil.getFileToSelect(myChooserDescriptor, myProject, toSelect, ourLastPath);
final VirtualFile lastOpenedFile = FileChooserUtil.getLastOpenedFile(myProject);
final VirtualFile selectFile = FileChooserUtil.getFileToSelect(myChooserDescriptor, myProject, toSelect, lastOpenedFile);
final String selectPath = selectFile != null ? FileUtil.toSystemDependentName(selectFile.getPath()) : null;
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
public void run() {
showNativeChooserAsSheet(selectPath);
showNativeChooserAsSheet(MacFileChooserDialogImpl.this, selectPath);
}
});
}
@@ -288,7 +285,7 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
return null;
}
private static void showNativeChooserAsSheet(@Nullable final String toSelect) {
private static void showNativeChooserAsSheet(@NotNull final MacFileChooserDialogImpl impl, @Nullable final String toSelect) {
final IdeMenuBar bar = getMenuBar();
if (bar != null) {
bar.disableUpdates();
@@ -298,6 +295,7 @@ public class MacFileChooserDialogImpl implements PathChooserDialog {
try {
final ID delegate = invoke(Foundation.getObjcClass("NSOpenPanelDelegate_"), "new");
Foundation.cfRetain(delegate);
ourImplMap.put(delegate, impl);
final ID select = toSelect == null ? null : Foundation.nsString(toSelect);
@@ -857,7 +857,9 @@ unscramble.stacktrace.caption=Put a stack trace or a complete thread dump here:
unscramble.dialog.title=Analyze Stacktrace
unscramble.no.unscrambler.item=<Do not unscramble>
unscramble.normalize.button=&Normalize
unscramble.unscrambled.stacktrace.tab=<Unscrambled Stacktrace>
unscramble.unscrambled.stacktrace.tab=<Stacktrace>
unscramble.unscrambled.threaddump.tab=<Threads>
unscramble.unscrambled.deadlock.tab=<Deadlock>
updates.info.dialog.title=Update Info
updates.no.updates.message=<html><h4>You are using the latest version of $FULLNAME$.</h4></html>
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -151,7 +151,8 @@ public abstract class AbstractEditorProcessingOnDocumentModificationTest extends
protected static void setupSoftWraps(@NotNull String data) {
Scanner scanner = new Scanner(data);
Pattern generalPattern =
Pattern.compile("visual line: (\\d+), offsets: (\\d+)-(\\d+), fold regions: \\[([^\\]]*)\\], tab data: \\[([^\\]]*)\\]");
Pattern.compile("visual line: (\\d+), offsets: (\\d+)-(\\d+), logical lines: (\\d+)-(\\d+), logical columns: (\\d+)-(\\d+), "
+ "end visual column: (\\d+), fold regions: \\[([^\\]]*)\\], tab data: \\[([^\\]]*)\\]");
Pattern foldPattern = Pattern.compile("width in columns: (-?\\d+), start X: (-?\\d+), fold region: FoldRegion [-+]\\((\\d+):(\\d+)");
Pattern tabPattern = Pattern.compile("\\[(\\d+), width: (\\d+)");
final SoftWrapModelImpl softWrapModel = (SoftWrapModelImpl)myEditor.getSoftWrapModel();
@@ -163,9 +164,14 @@ public abstract class AbstractEditorProcessingOnDocumentModificationTest extends
int visualLine = Integer.parseInt(generalMatch.group(1));
int startOffset = Integer.parseInt(generalMatch.group(2));
int endOffset = Integer.parseInt(generalMatch.group(3));
int startLogicalLine = Integer.parseInt(generalMatch.group(4));
int endLogicalLine = Integer.parseInt(generalMatch.group(5));
int startLogicalColumn = Integer.parseInt(generalMatch.group(6));
int endLogicalColumn = Integer.parseInt(generalMatch.group(7));
int endVisualColumn = Integer.parseInt(generalMatch.group(8));
List<Trinity<Integer, Integer, FoldRegion>> foldRegions = new ArrayList<Trinity<Integer, Integer, FoldRegion>>();
Scanner foldScanner = new Scanner(generalMatch.group(4));
Scanner foldScanner = new Scanner(generalMatch.group(9));
while (foldScanner.findInLine(foldPattern) != null) {
final MatchResult foldMatch = foldScanner.match();
int widthInColumns = Integer.parseInt(foldMatch.group(1));
@@ -183,7 +189,7 @@ public abstract class AbstractEditorProcessingOnDocumentModificationTest extends
}
List<Pair<Integer, Integer>> tabData = new ArrayList<Pair<Integer, Integer>>();
Scanner tabScanner = new Scanner(generalMatch.group(5));
Scanner tabScanner = new Scanner(generalMatch.group(10));
while (tabScanner.findInLine(tabPattern) != null) {
final MatchResult tabMatch = tabScanner.match();
int offset = Integer.parseInt(tabMatch.group(1));
@@ -191,7 +197,7 @@ public abstract class AbstractEditorProcessingOnDocumentModificationTest extends
tabData.add(new Pair<Integer, Integer>(offset, widthInColumns));
}
mapper.rawAdd(visualLine, startOffset, endOffset, foldRegions, tabData);
mapper.rawAdd(visualLine, startOffset, endOffset, startLogicalLine, startLogicalColumn, endLogicalLine, endLogicalColumn, endVisualColumn, foldRegions, tabData);
}
}
@@ -95,7 +95,7 @@ public class VcsDirtyScopeVfsListener implements ApplicationComponent, BulkFileL
}
}
// and notify VCSDirtyScopeManager
dirtyFilesAndDirs.markDirty();
markDirtyOnPooled(dirtyFilesAndDirs);
}
@Override
@@ -126,12 +126,18 @@ public class VcsDirtyScopeVfsListener implements ApplicationComponent, BulkFileL
}
}
// and notify VCSDirtyScopeManager
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
dirtyFilesAndDirs.markDirty();
}
});
markDirtyOnPooled(dirtyFilesAndDirs);
}
private void markDirtyOnPooled(final FileAndDirsCollector dirtyFilesAndDirs) {
if (! dirtyFilesAndDirs.isEmpty()) {
ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
dirtyFilesAndDirs.markDirty();
}
});
}
}
@Nullable
@@ -202,6 +208,10 @@ public class VcsDirtyScopeVfsListener implements ApplicationComponent, BulkFileL
manager.filePathsDirty(files, dirs);
}
}
public boolean isEmpty() {
return map.isEmpty();
}
}
/**
@@ -213,13 +223,18 @@ public class VcsDirtyScopeVfsListener implements ApplicationComponent, BulkFileL
private Collection<VcsDirtyScopeManager> getManagers(final VirtualFile file) {
final Collection<VcsDirtyScopeManager> result = new HashSet<VcsDirtyScopeManager>();
if (file == null) { return result; }
final Collection<Project> projects = myProjectLocator.getProjectsForFile(file);
for (Project project : projects) {
final VcsDirtyScopeManager manager = VcsDirtyScopeManager.getInstance(project);
if (manager != null) {
result.add(manager);
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
final Collection<Project> projects = myProjectLocator.getProjectsForFile(file);
for (Project project : projects) {
final VcsDirtyScopeManager manager = VcsDirtyScopeManager.getInstance(project);
if (manager != null) {
result.add(manager);
}
}
}
}
});
return result;
}
@@ -75,10 +75,11 @@ public class VcsGuess {
private Boolean isFileInIndex(@Nullable final FilePath filePath, final VirtualFile validParent) {
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
public Boolean compute() {
if (myProject.isDisposed()) return false;
final boolean inContent = myVcsManager.isFileInContent(validParent);
if (inContent) return true;
if (filePath != null) {
return isFileInBaseDir(filePath, myProject.getBaseDir()) && ! ! myExcludedFileIndex.isExcludedFile(validParent);
return isFileInBaseDir(filePath, myProject.getBaseDir()) && ! myExcludedFileIndex.isExcludedFile(validParent);
}
return false;
}
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.xdebugger.impl.ui.BreakpointEditor">
<grid id="27dc6" binding="myMainPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<grid id="27dc6" binding="myMainPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="5" left="5" bottom="5" right="5"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
@@ -10,7 +10,7 @@
<children>
<grid id="e1a21" binding="myPropertiesPlaceholder" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@@ -19,7 +19,7 @@
<grid id="3bdaa" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
@@ -243,11 +243,12 @@ public class DebuggerUIUtil {
editor.setPropertiesPanel(mainPanel);
editor.setShowMoreOptionsLink(showMoreOptions != null);
final Balloon balloon = JBPopupFactory.getInstance().
createDialogBalloonBuilder(editor.getMainPanel(), displayName).
setHideOnClickOutside(false).
setCloseButtonEnabled(false).
createBalloon();
final Balloon balloon = JBPopupFactory.getInstance()
.createDialogBalloonBuilder(editor.getMainPanel(), null)
.setHideOnClickOutside(true)
.setCloseButtonEnabled(false)
.setAnimationCycle(0)
.createBalloon();
editor.setDelegate(new BreakpointEditor.Delegate() {
@Override
@@ -29,6 +29,7 @@ import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
import org.jetbrains.idea.maven.project.MavenProjectsManager;
import java.util.Collection;
@@ -51,6 +52,7 @@ public class MavenConfigurationProducer extends RuntimeConfigurationProducer {
myPsiElement = location.getPsiElement();
final MavenRunnerParameters params = createBuildParameters(location);
if (params == null) return null;
return MavenRunConfigurationType.createRunnerAndConfigurationSettings(null, null, params, location.getProject());
}
@@ -21,6 +21,7 @@ package org.jetbrains.idea.maven.execution;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.JavaParameters;
import com.intellij.execution.configurations.ParametersList;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.JavaSdk;
import com.intellij.openapi.projectRoots.ProjectJdkTable;
@@ -33,6 +34,7 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
import org.jetbrains.idea.maven.project.MavenProjectsManager;
import org.jetbrains.idea.maven.utils.MavenUtil;
import java.io.File;
@@ -48,11 +50,20 @@ public class MavenExternalParameters {
@NonNls private static final String MAVEN_OPTS = "MAVEN_OPTS";
public static JavaParameters createJavaParameters(@Nullable final Project project,
final MavenRunnerParameters parameters,
final MavenGeneralSettings coreSettings,
final MavenRunnerSettings runnerSettings) throws ExecutionException {
@NotNull final MavenRunnerParameters parameters,
@Nullable MavenGeneralSettings coreSettings,
@Nullable MavenRunnerSettings runnerSettings) throws ExecutionException {
final JavaParameters params = new JavaParameters();
ApplicationManager.getApplication().assertReadAccessAllowed();
if (coreSettings == null) {
coreSettings = project == null ? new MavenGeneralSettings() : MavenProjectsManager.getInstance(project).getGeneralSettings();
}
if (runnerSettings == null) {
runnerSettings = project == null ? new MavenRunnerSettings() : MavenRunner.getInstance(project).getState();
}
params.setWorkingDirectory(parameters.getWorkingDirFile());
params.setJdk(getJdk(runnerSettings, project != null && MavenRunner.getInstance(project).getState() == runnerSettings));
@@ -123,19 +123,21 @@ public class MavenRunConfiguration extends RunConfigurationBase implements Locat
return Module.EMPTY_ARRAY;
}
@Nullable
public MavenGeneralSettings getGeneralSettings() {
return mySettings.myGeneralSettings;
}
public void setGeneralSettings(MavenGeneralSettings settings) {
public void setGeneralSettings(@Nullable MavenGeneralSettings settings) {
mySettings.myGeneralSettings = settings;
}
@Nullable
public MavenRunnerSettings getRunnerSettings() {
return mySettings.myRunnerSettings;
}
public void setRunnerSettings(MavenRunnerSettings settings) {
public void setRunnerSettings(@Nullable MavenRunnerSettings settings) {
mySettings.myRunnerSettings = settings;
}
@@ -155,8 +157,6 @@ public class MavenRunConfiguration extends RunConfigurationBase implements Locat
mySettings = XmlSerializer.deserialize(mavenSettingsElement, MavenSettings.class);
if (mySettings == null) mySettings = new MavenSettings();
if (mySettings.myGeneralSettings == null) mySettings.myGeneralSettings = new MavenGeneralSettings();
if (mySettings.myRunnerSettings == null) mySettings.myRunnerSettings = new MavenRunnerSettings();
if (mySettings.myRunnerParameters == null) mySettings.myRunnerParameters = new MavenRunnerParameters();
// fix old settings format
@@ -193,13 +193,12 @@ public class MavenRunConfiguration extends RunConfigurationBase implements Locat
}
public MavenSettings(Project project) {
this(MavenProjectsManager.getInstance(project).getGeneralSettings(), MavenRunner.getInstance(project).getState(),
new MavenRunnerParameters());
this(null, null, new MavenRunnerParameters());
}
private MavenSettings(MavenGeneralSettings cs, MavenRunnerSettings rs, MavenRunnerParameters rp) {
myGeneralSettings = cs.clone();
myRunnerSettings = rs.clone();
private MavenSettings(@Nullable MavenGeneralSettings cs, @Nullable MavenRunnerSettings rs, MavenRunnerParameters rp) {
myGeneralSettings = cs == null ? null : cs.clone();
myRunnerSettings = rs == null ? null : rs.clone();
myRunnerParameters = rp.clone();
}
@@ -20,7 +20,8 @@ import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SettingsEditor;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.idea.maven.project.MavenGeneralConfigurable;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.maven.project.MavenGeneralConfigurableWithUseProjectSettings;
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
import javax.swing.*;
@@ -38,15 +39,25 @@ public class MavenRunConfigurationSettings extends SettingsEditor<MavenRunConfig
protected MavenRunnerParameters getParameters() {
return configuration.getRunnerParameters();
}
}, new MavenGeneralConfigurable() {
}, new MavenGeneralConfigurableWithUseProjectSettings(p) {
protected MavenGeneralSettings getState() {
return configuration.getGeneralSettings();
}
}, new MavenRunnerConfigurable(p, true) {
@Override
public void setState(@Nullable MavenGeneralSettings state) {
configuration.setGeneralSettings(state);
}
}, new MavenRunnerConfigurableWithUseProjectSettings(p) {
protected MavenRunnerSettings getState() {
return configuration.getRunnerSettings();
}
});
@Override
public void setState(@Nullable MavenRunnerSettings state) {
configuration.setRunnerSettings(state);
}
});
}
protected void resetEditorFrom(MavenRunConfiguration configuration) {
@@ -147,15 +147,13 @@ public class MavenRunConfigurationType implements ConfigurationType {
public static void runConfiguration(Project project,
MavenRunnerParameters params,
@Nullable ProgramRunner.Callback callback) {
MavenGeneralSettings settings = MavenProjectsManager.getInstance(project).getGeneralSettings();
MavenRunnerSettings runnerSettings = MavenRunner.getInstance(project).getState();
runConfiguration(project, params, settings, runnerSettings, callback);
runConfiguration(project, params, null, null, callback);
}
public static void runConfiguration(Project project,
MavenRunnerParameters params,
MavenGeneralSettings settings,
MavenRunnerSettings runnerSettings,
@NotNull MavenRunnerParameters params,
@Nullable MavenGeneralSettings settings,
@Nullable MavenRunnerSettings runnerSettings,
@Nullable ProgramRunner.Callback callback) {
RunnerAndConfigurationSettings configSettings = createRunnerAndConfigurationSettings(settings,
runnerSettings,
@@ -174,8 +172,8 @@ public class MavenRunConfigurationType implements ConfigurationType {
}
}
static RunnerAndConfigurationSettings createRunnerAndConfigurationSettings(MavenGeneralSettings generalSettings,
MavenRunnerSettings runnerSettings,
static RunnerAndConfigurationSettings createRunnerAndConfigurationSettings(@Nullable MavenGeneralSettings generalSettings,
@Nullable MavenRunnerSettings runnerSettings,
MavenRunnerParameters params,
Project project) {
MavenRunConfigurationType type = ConfigurationTypeUtil.findConfigurationType(MavenRunConfigurationType.class);
@@ -184,8 +182,8 @@ public class MavenRunConfigurationType implements ConfigurationType {
.createConfiguration(generateName(project, params), type.myFactory);
MavenRunConfiguration runConfiguration = (MavenRunConfiguration)settings.getConfiguration();
runConfiguration.setRunnerParameters(params);
if (generalSettings != null) runConfiguration.setGeneralSettings(generalSettings);
if (runnerSettings != null) runConfiguration.setRunnerSettings(runnerSettings);
runConfiguration.setGeneralSettings(generalSettings);
runConfiguration.setRunnerSettings(runnerSettings);
return settings;
}
@@ -38,7 +38,7 @@ import java.util.Map;
import java.util.Properties;
public abstract class MavenRunnerConfigurable implements SearchableConfigurable, Configurable.NoScroll {
private final Project myProject;
protected final Project myProject;
private final boolean myRunConfigurationMode;
private JCheckBox myRunInBackgroundCheckbox;
@@ -0,0 +1,91 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.idea.maven.execution;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.idea.maven.project.MavenDisablePanelCheckbox;
import javax.swing.*;
import java.awt.*;
/**
* @author Sergey Evdokimov
*/
public abstract class MavenRunnerConfigurableWithUseProjectSettings extends MavenRunnerConfigurable {
private JCheckBox myUseProjectSettings;
public MavenRunnerConfigurableWithUseProjectSettings(@NotNull Project project) {
super(project, true);
}
public abstract void setState(@Nullable MavenRunnerSettings state);
@Override
public boolean isModified() {
if (myUseProjectSettings.isSelected()) {
return getState() != null;
}
else {
return getState() == null || super.isModified();
}
}
@Override
public void apply() {
if (myUseProjectSettings.isSelected()) {
setState(null);
}
else {
MavenRunnerSettings state = getState();
if (state != null) {
setData(state);
}
else {
MavenRunnerSettings settings = MavenRunner.getInstance(myProject).getSettings().clone();
setData(settings);
setState(settings);
}
}
}
@Override
public void reset() {
MavenRunnerSettings state = getState();
myUseProjectSettings.setSelected(state == null);
if (state == null) {
MavenRunnerSettings settings = MavenRunner.getInstance(myProject).getSettings();
getData(settings);
}
else {
getData(state);
}
}
@Override
public JComponent createComponent() {
Pair<JPanel,JCheckBox> pair = MavenDisablePanelCheckbox.createPanel(super.createComponent(), "Use project settings");
myUseProjectSettings = pair.second;
return pair.first;
}
}
@@ -0,0 +1,107 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.idea.maven.project;
import com.intellij.openapi.util.Pair;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.util.HashSet;
import java.util.Set;
/**
* @author Sergey Evdokimov
*/
public class MavenDisablePanelCheckbox extends JCheckBox {
private final JComponent myPanel;
private Set<JComponent> myDisabledComponents;
public MavenDisablePanelCheckbox(String text, @NotNull JComponent panel) {
super(text);
myPanel = panel;
addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (MavenDisablePanelCheckbox.this.isSelected()) {
if (myDisabledComponents == null) {
myDisabledComponents = new HashSet<JComponent>();
disable(myPanel);
}
}
else {
if (myDisabledComponents != null) {
enable(myPanel);
myDisabledComponents = null;
}
}
}
});
}
private void disable(JComponent c) {
if (c.isEnabled()) {
myDisabledComponents.add(c);
c.setEnabled(false);
}
for (Component component : c.getComponents()) {
if (component instanceof JComponent) {
disable((JComponent)component);
}
}
}
private void enable(JComponent c) {
if (myDisabledComponents.contains(c)) {
c.setEnabled(true);
}
for (Component component : c.getComponents()) {
if (component instanceof JComponent) {
enable((JComponent)component);
}
}
}
public static Pair<JPanel, JCheckBox> createPanel(JComponent component, String title) {
JPanel panel = new JPanel(new BorderLayout()) {
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
Color c = enabled ? Color.GRAY : Color.LIGHT_GRAY;
setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, c), BorderFactory.createEmptyBorder(10, 0, 0, 0)));
}
};
panel.setEnabled(true);
panel.add(component);
JCheckBox checkbox = new MavenDisablePanelCheckbox(title, panel);
JPanel res = new JPanel(new BorderLayout(0, 10));
res.add(checkbox, BorderLayout.NORTH);
res.add(panel, BorderLayout.CENTER);
return Pair.create(res, checkbox);
}
}
@@ -192,7 +192,7 @@ public class MavenEnvironmentForm implements PanelWithAnchor {
isOverridden = override;
component.setEditable(override);
component.setEnabled(override);
component.setEnabled(override && checkBox.isEnabled());
if (override) {
if (overrideText != null) component.setText(overrideText);
@@ -139,7 +139,7 @@ public abstract class MavenGeneralConfigurable implements SearchableConfigurable
getData(getState());
}
private void setData(MavenGeneralSettings data) {
protected void setData(MavenGeneralSettings data) {
data.beginUpdate();
data.setWorkOffline(checkboxWorkOffline.isSelected());
@@ -158,7 +158,7 @@ public abstract class MavenGeneralConfigurable implements SearchableConfigurable
data.endUpdate();
}
private void getData(MavenGeneralSettings data) {
protected void getData(MavenGeneralSettings data) {
checkboxWorkOffline.setSelected(data.isWorkOffline());
mavenPathsForm.getData(data);
@@ -0,0 +1,90 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.idea.maven.project;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Pair;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
/**
* @author Sergey Evdokimov
*/
public abstract class MavenGeneralConfigurableWithUseProjectSettings extends MavenGeneralConfigurable {
private JCheckBox myUseProjectSettings;
private final Project myProject;
protected MavenGeneralConfigurableWithUseProjectSettings(@NotNull Project project) {
myProject = project;
}
public abstract void setState(@Nullable MavenGeneralSettings state);
@Override
public boolean isModified() {
if (myUseProjectSettings.isSelected()) {
return getState() != null;
}
else {
return getState() == null || super.isModified();
}
}
@Override
public void apply() {
if (myUseProjectSettings.isSelected()) {
setState(null);
}
else {
MavenGeneralSettings state = getState();
if (state != null) {
setData(state);
}
else {
MavenGeneralSettings settings = MavenProjectsManager.getInstance(myProject).getGeneralSettings().clone();
setData(settings);
setState(settings);
}
}
}
@Override
public void reset() {
MavenGeneralSettings state = getState();
myUseProjectSettings.setSelected(state == null);
if (state == null) {
MavenGeneralSettings settings = MavenProjectsManager.getInstance(myProject).getGeneralSettings();
getData(settings);
}
else {
getData(state);
}
}
@Override
public JComponent createComponent() {
Pair<JPanel,JCheckBox> pair = MavenDisablePanelCheckbox.createPanel(super.createComponent(), "Use project settings");
myUseProjectSettings = pair.second;
return pair.first;
}
}
@@ -19,6 +19,8 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.xmlb.annotations.Property;
import com.intellij.util.xmlb.annotations.Transient;
import gnu.trove.THashSet;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
@@ -71,6 +73,7 @@ public class MavenGeneralSettings implements Cloneable {
fireChanged();
}
@Property
@NotNull
public MavenExecutionOptions.PluginUpdatePolicy getPluginUpdatePolicy() {
return pluginUpdatePolicy;
@@ -82,6 +85,7 @@ public class MavenGeneralSettings implements Cloneable {
changed();
}
@Property
@NotNull
public MavenExecutionOptions.ChecksumPolicy getChecksumPolicy() {
return checksumPolicy;
@@ -93,6 +97,7 @@ public class MavenGeneralSettings implements Cloneable {
changed();
}
@Property
@NotNull
public MavenExecutionOptions.FailureMode getFailureBehavior() {
return failureBehavior;
@@ -104,9 +109,16 @@ public class MavenGeneralSettings implements Cloneable {
changed();
}
public
@Transient
@NotNull
MavenExecutionOptions.LoggingLevel getLoggingLevel() {
@Deprecated // Use getOutputLevel()
public MavenExecutionOptions.LoggingLevel getLoggingLevel() {
return getOutputLevel();
}
@Property
@NotNull
public MavenExecutionOptions.LoggingLevel getOutputLevel() {
return outputLevel;
}
@@ -116,9 +128,9 @@ public class MavenGeneralSettings implements Cloneable {
changed();
}
public
@Property
@NotNull
MavenExecutionOptions.SnapshotUpdatePolicy getSnapshotUpdatePolicy() {
public MavenExecutionOptions.SnapshotUpdatePolicy getSnapshotUpdatePolicy() {
return snapshotUpdatePolicy;
}
@@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableMap;
import com.intellij.testFramework.IdeaTestCase;
import com.intellij.util.xmlb.XmlSerializer;
import org.jdom.Element;
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
import java.util.Arrays;
@@ -29,6 +30,14 @@ public class MavenRunConfigurationTest extends IdeaTestCase {
s.myRunnerParameters.setGoals(Arrays.asList("clean", "validate"));
s.myRunnerParameters.setProfilesMap(ImmutableMap.of("prof1", true, "prof2", true, "prof3", false));
s.myGeneralSettings = new MavenGeneralSettings();
s.myGeneralSettings.setChecksumPolicy(MavenExecutionOptions.ChecksumPolicy.WARN);
s.myGeneralSettings.setFailureBehavior(MavenExecutionOptions.FailureMode.AT_END);
s.myGeneralSettings.setOutputLevel(MavenExecutionOptions.LoggingLevel.FATAL);
s.myRunnerSettings = new MavenRunnerSettings();
s.myRunnerSettings.setMavenProperties(ImmutableMap.of("a", "1", "b", "2", "c", "3"));
Element xml = XmlSerializer.serialize(s);
MavenRunConfiguration.MavenSettings loaded
= XmlSerializer.deserialize(xml, MavenRunConfiguration.MavenSettings.class);
@@ -36,5 +45,8 @@ public class MavenRunConfigurationTest extends IdeaTestCase {
assertEquals(s.myRunnerParameters.getWorkingDirPath(), loaded.myRunnerParameters.getWorkingDirPath());
assertEquals(s.myRunnerParameters.getGoals(), loaded.myRunnerParameters.getGoals());
assertEquals(s.myRunnerParameters.getProfilesMap(), loaded.myRunnerParameters.getProfilesMap());
assertEquals(s.myGeneralSettings, loaded.myGeneralSettings);
assertEquals(s.myRunnerSettings, loaded.myRunnerSettings);
}
}
@@ -16,7 +16,6 @@
package com.intellij.tasks.actions;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.intellij.tasks.Comment;
@@ -49,9 +48,7 @@ public class AnalyzeTaskStacktraceAction extends BaseTaskAction {
if (stacktraceDialog.isOK() && stacktraceDialog.getTraces().length > 0) {
Comment[] comments = stacktraceDialog.getTraces();
for (Comment comment : comments) {
ConsoleView consoleView = AnalyzeStacktraceUtil.addConsole(project, null, task.getId());
consoleView.allowHeavyFilters();
AnalyzeStacktraceUtil.printStacktrace(consoleView, comment.getText());
AnalyzeStacktraceUtil.addConsole(project, null, task.getId(), comment.getText());
}
}
}
@@ -47,7 +47,7 @@ public class TestNGInClassConfigurationProducer extends TestNGConfigurationProdu
@Nullable
protected RunnerAndConfigurationSettings createConfigurationByElement(Location location, ConfigurationContext context) {
final PsiElement[] elements = LangDataKeys.PSI_ELEMENT_ARRAY.getData(context.getDataContext());
final PsiElement[] elements = context != null ? LangDataKeys.PSI_ELEMENT_ARRAY.getData(context.getDataContext()) : null;
if (elements != null && TestNGPatternConfigurationProducer.collectTestMembers(elements).size() > 1) {
return null;
}
@@ -56,7 +56,7 @@ public class TestNGEntryPoint extends EntryPoint {
public boolean isEntryPoint(PsiElement psiElement) {
if (ADD_TESTNG_TO_ENTRIES) {
if (psiElement instanceof PsiModifierListOwner) {
if (TestNGUtil.hasTest((PsiModifierListOwner)psiElement, false)) return true;
if (TestNGUtil.hasTest((PsiModifierListOwner)psiElement, false, false, TestNGUtil.hasDocTagsSupport)) return true;
return TestNGUtil.hasConfig((PsiModifierListOwner)psiElement);
}
}
@@ -171,13 +171,13 @@ public class TestNGUtil
}
public static boolean hasTest(PsiModifierListOwner element, boolean checkDisabled) {
return hasTest(element, checkDisabled, hasDocTagsSupport);
return hasTest(element, true, checkDisabled, hasDocTagsSupport);
}
public static boolean hasTest(PsiModifierListOwner element, boolean checkDisabled, boolean checkJavadoc) {
public static boolean hasTest(PsiModifierListOwner element, boolean checkHierarchy, boolean checkDisabled, boolean checkJavadoc) {
//LanguageLevel effectiveLanguageLevel = element.getManager().getEffectiveLanguageLevel();
//boolean is15 = effectiveLanguageLevel != LanguageLevel.JDK_1_4 && effectiveLanguageLevel != LanguageLevel.JDK_1_3;
boolean hasAnnotation = AnnotationUtil.isAnnotated(element, TEST_ANNOTATION_FQN, true, true);
boolean hasAnnotation = AnnotationUtil.isAnnotated(element, TEST_ANNOTATION_FQN, checkHierarchy, true);
if (hasAnnotation) {
if (checkDisabled) {
PsiAnnotation annotation = AnnotationUtil.findAnnotation(element, true, TEST_ANNOTATION_FQN);
@@ -207,7 +207,7 @@ public class TestNGUtil
//if it's a method, we check if the class it's in has a global @Test annotation
PsiClass psiClass = ((PsiMethod)element).getContainingClass();
if (psiClass != null) {
if (AnnotationUtil.isAnnotated(psiClass, TEST_ANNOTATION_FQN, true, true)) {
if (AnnotationUtil.isAnnotated(psiClass, TEST_ANNOTATION_FQN, checkHierarchy, true)) {
//even if it has a global test, we ignore private methods
boolean isPrivate = element.hasModifierProperty(PsiModifier.PRIVATE);
return !isPrivate;
@@ -463,7 +463,7 @@ public class TestNGUtil
}
public static boolean isTestNGClass(PsiClass psiClass) {
return hasTest(psiClass, true, false);
return hasTest(psiClass, true, true, false);
}
public static boolean checkTestNGInClasspath(PsiElement psiElement) {