mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+1
@@ -231,6 +231,7 @@ public class ClasspathPanelImpl extends JPanel implements ClasspathPanel {
|
||||
navigateAction.registerCustomShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_EDIT_SOURCE).getShortcutSet(),
|
||||
myEntryTable);
|
||||
actionGroup.add(myEditButton);
|
||||
actionGroup.add(myRemoveButton);
|
||||
actionGroup.add(navigateAction);
|
||||
actionGroup.add(new MyFindUsagesAction());
|
||||
actionGroup.add(new AnalyzeDependencyAction());
|
||||
|
||||
@@ -1094,15 +1094,13 @@ class ControlFlowAnalyzer extends JavaElementVisitor {
|
||||
PsiExpression operand = operands[i];
|
||||
operand.accept(this);
|
||||
generateBoxingUnboxingInstructionFor(operand, exprType);
|
||||
PsiExpression nextOperand = i == operands.length - 1 ? null : operands[i + 1];
|
||||
|
||||
if (nextOperand != null) {
|
||||
ConditionalGotoInstruction onFail = new ConditionalGotoInstruction(-1, true, operand);
|
||||
branchToFail.add(onFail);
|
||||
addInstruction(onFail);
|
||||
}
|
||||
ConditionalGotoInstruction onFail = new ConditionalGotoInstruction(-1, true, operand);
|
||||
branchToFail.add(onFail);
|
||||
addInstruction(onFail);
|
||||
}
|
||||
|
||||
addInstruction(new PushInstruction(myFactory.getConstFactory().getTrue(), null));
|
||||
GotoInstruction toSuccess = new GotoInstruction(-1);
|
||||
addInstruction(toSuccess);
|
||||
PushInstruction pushFalse = new PushInstruction(myFactory.getConstFactory().getFalse(), null);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
class Fun {
|
||||
private void parseDeclarator(Object builder, boolean isTuple) {
|
||||
if (!isTuple) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (smth() && <warning descr="Condition 'isTuple' is always 'true' when reached">isTuple</warning>) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean smth() { return true; }
|
||||
}
|
||||
@@ -375,4 +375,13 @@
|
||||
<problem_class>Constant conditions & exceptions</problem_class>
|
||||
<description>Unboxing of <code>i</code> may produce <code>java.lang.NullPointerException</code>.</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>Test.java</file>
|
||||
<line>67</line>
|
||||
<package><default></package>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Constant conditions & exceptions</problem_class>
|
||||
<description>Condition <code>i</code> is always <code>true</code> when reached</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
|
||||
@@ -138,5 +138,6 @@ public class DataFlowInspectionFixtureTest extends JavaCodeInsightFixtureTestCas
|
||||
|
||||
public void testMethodCallFlushesField() { doTest(); }
|
||||
public void testUnknownFloatMayBeNaN() { doTest(); }
|
||||
public void testLastConstantConditionInAnd() { doTest(); }
|
||||
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ public class ToggleLaggingModeAction extends AnAction implements DumbAware {
|
||||
final Project project = PlatformDataKeys.PROJECT.getData(e.getDataContext());
|
||||
presentation.setEnabled(project != null && myLagging == DumbServiceImpl.getInstance(project).isDumb());
|
||||
if (myLagging) {
|
||||
presentation.setText("Exit dumb mode");
|
||||
presentation.setText("Exit lagging mode");
|
||||
}
|
||||
else {
|
||||
presentation.setText("Enter dumb mode");
|
||||
presentation.setText("Enter lagging mode");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,28 +536,33 @@
|
||||
<separator/>
|
||||
<action internal="true" id="ReloadProjectAction" class="com.intellij.internal.ReloadProjectAction"/>
|
||||
<action internal="true" id="RestartInfo" class="com.intellij.internal.RestartInfoAction" text="Restart Info"/>
|
||||
<action internal="true" id="PruneEmptyDirectories" class="com.intellij.ide.actions.PruneEmptyDirectoriesAction" text="Prune Empty Directories"/>
|
||||
<action internal="true" id="FixLineSeparators" class="com.intellij.ide.actions.FixLineSeparatorsAction" text="Fix Line Separators"/>
|
||||
<action id="DumbMode" internal="true" class="com.intellij.internal.ToggleDumbModeAction" text="Dumb mode"/>
|
||||
<action id="LaggingMode" internal="true" class="com.intellij.internal.ToggleLaggingModeAction" text="Lagging mode"/>
|
||||
<separator/>
|
||||
<action id="NotificationTestAction" internal="true" class="com.intellij.notification.impl.actions.NotificationTestAction"
|
||||
text="Add Test Notification"/>
|
||||
<action id="TestMessageBoxAction" internal="true" class="com.intellij.diagnostic.TestMessageBoxAction" text="Show Test Dialog"/>
|
||||
<separator/>
|
||||
<action id="FocusDebugger" internal="true" class="com.intellij.internal.focus.FocusDebuggerAction" text="Start Focus Debugger"/>
|
||||
<action id="FocusTracer" internal="true" class="com.intellij.internal.focus.FocusTracesAction" text="Start Focus Trace">
|
||||
<keyboard-shortcut first-keystroke="control shift F11" keymap="$default"/>
|
||||
</action>
|
||||
<group id="Internal.UI" popup="true" text="UI">
|
||||
<action id="NotificationTestAction" internal="true" class="com.intellij.notification.impl.actions.NotificationTestAction"
|
||||
text="Add Test Notification"/>
|
||||
<action id="TestMessageBoxAction" internal="true" class="com.intellij.diagnostic.TestMessageBoxAction" text="Show Test Dialog"/>
|
||||
<separator/>
|
||||
<action id="FocusDebugger" internal="true" class="com.intellij.internal.focus.FocusDebuggerAction" text="Start Focus Debugger"/>
|
||||
<action id="FocusTracer" internal="true" class="com.intellij.internal.focus.FocusTracesAction" text="Start Focus Trace">
|
||||
<keyboard-shortcut first-keystroke="control shift F11" keymap="$default"/>
|
||||
</action>
|
||||
|
||||
<action id="UiInspector" internal="true" class="com.intellij.internal.inspector.UiInspectorAction" text="UI Inspector"/>
|
||||
<action id="UiInspector" internal="true" class="com.intellij.internal.inspector.UiInspectorAction" text="UI Inspector"/>
|
||||
<action id="ShowSplash" internal="true" class="com.intellij.ui.ShowSplashAction" text="Show Splash" />
|
||||
<action id="ValidationTest" internal="true" class="com.intellij.internal.validation.TestDialogWithValidationAction" text="Validation Dialog Test" />
|
||||
<action id="MacMessagesTest" internal="true" class="com.intellij.internal.validation.TestMacMessagesAction" text="Test Mac Messages" />
|
||||
<action id="TreeExpandAll" internal="true" class="com.intellij.internal.tree.ExpandAll" text="Expand Tree" />
|
||||
<action id="UIDefaults" internal="true" class="com.intellij.ui.ShowUIDefaultsAction" text="LaF Defaults"/>
|
||||
<separator/>
|
||||
<action id="AddTestProcessAction" internal="true" class="com.intellij.openapi.wm.impl.status.AddTestProcessAction" text="Add Test Process"/>
|
||||
<action id="AddTestProcessActionIndefinte" internal="true" class="com.intellij.openapi.wm.impl.status.AddTestProcessActionIndefinite" text="Add Test Process Indefinite"/>
|
||||
<separator/>
|
||||
<action id="TestGestureAction" class="com.intellij.openapi.keymap.impl.ui.TestGestureAction" text="Test Gesture Action"/>
|
||||
</group>
|
||||
<group id="TopAnomalies" internal="true" class="com.intellij.internal.anomalies.TopAnomaliesAction" text="Top Anomalies" popup="true"/>
|
||||
<action id="ShowSplash" internal="true" class="com.intellij.ui.ShowSplashAction" text="Show Splash" />
|
||||
<action id="ValidationTest" internal="true" class="com.intellij.internal.validation.TestDialogWithValidationAction" text="Validation Dialog Test" />
|
||||
<action id="MacMessagesTest" internal="true" class="com.intellij.internal.validation.TestMacMessagesAction" text="Test Mac Messages" />
|
||||
<action id="ImageDuplicates" internal="true" class="com.intellij.internal.ShowImageDuplicatesAction" text="Find Image Duplicates"/>
|
||||
<action id="TreeExpandAll" internal="true" class="com.intellij.internal.tree.ExpandAll" text="Expand Tree" />
|
||||
<action id="UIDefaults" internal="true" class="com.intellij.ui.ShowUIDefaultsAction" text="LaF Defaults"/>
|
||||
<separator/>
|
||||
<reference ref="MaintenanceGroup"/>
|
||||
|
||||
|
||||
+7
-3
@@ -66,7 +66,7 @@ public class AntArtifactBuildTaskProvider extends ArtifactBuildTaskProvider {
|
||||
@Override
|
||||
public List<? extends BuildTask> createArtifactBuildTasks(@NotNull JpsArtifact artifact, @NotNull ArtifactBuildPhase buildPhase) {
|
||||
JpsAntArtifactExtension extension = getBuildExtension(artifact, buildPhase);
|
||||
if (extension != null && extension.isEnabled()) {
|
||||
if (extension != null && extension.isEnabled() && !StringUtil.isEmpty(extension.getFileUrl())) {
|
||||
return Collections.singletonList(new AntArtifactBuildTask(extension));
|
||||
}
|
||||
return Collections.emptyList();
|
||||
@@ -155,7 +155,10 @@ public class AntArtifactBuildTaskProvider extends ArtifactBuildTaskProvider {
|
||||
programParams.add("-buildfile");
|
||||
final String buildFilePath = JpsPathUtil.urlToPath(myExtension.getFileUrl());
|
||||
programParams.add(buildFilePath);
|
||||
programParams.add(myExtension.getTargetName());
|
||||
final String targetName = myExtension.getTargetName();
|
||||
if (targetName != null) {
|
||||
programParams.add(targetName);
|
||||
}
|
||||
|
||||
List<String> commandLine = ExternalProcessUtil.buildJavaCommandLine(JpsJavaSdkType.getJavaExecutable(jdk), AntMain2.class.getName(),
|
||||
Collections.<String>emptyList(), classpath, vmParams, programParams, false);
|
||||
@@ -182,7 +185,8 @@ public class AntArtifactBuildTaskProvider extends ArtifactBuildTaskProvider {
|
||||
if (exitCode != 0) {
|
||||
context.processMessage(new CompilerMessage(BUILDER_NAME, BuildMessage.Kind.ERROR, errorOutput.toString()));
|
||||
context.processMessage(new CompilerMessage(BUILDER_NAME, BuildMessage.Kind.ERROR,
|
||||
"target '" + myExtension.getTargetName() + "' in '" + buildFilePath + "' finished with exit code " + exitCode));
|
||||
"target '" +
|
||||
targetName + "' in '" + buildFilePath + "' finished with exit code " + exitCode));
|
||||
hasErrors.set(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,20 +120,18 @@
|
||||
<add-to-group anchor="last" group-id="GenerateGroup"/>
|
||||
</action>
|
||||
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ToggleHighlightingMarkupAction" text="Toggle Expected Highlighting Markup"
|
||||
id="ToggleHighlightingMarkup">
|
||||
<add-to-group anchor="last" group-id="Internal"/>
|
||||
</action>
|
||||
<group id="Internal.DevKit" internal="true" text="DevKit" popup="true">
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ToggleHighlightingMarkupAction" text="Toggle Expected Highlighting Markup"
|
||||
id="ToggleHighlightingMarkup"/>
|
||||
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ShuffleNamesAction" text="Shuffle Names"
|
||||
id="ShuffleNamesAction">
|
||||
<add-to-group anchor="last" group-id="Internal"/>
|
||||
</action>
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ShuffleNamesAction" text="Shuffle Names"
|
||||
id="ShuffleNamesAction"/>
|
||||
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ShowSerializedXmlAction" text="Show Serialized XML for Class"
|
||||
id="ShowSerializedXml"/>
|
||||
<add-to-group group-id="Internal" anchor="last"/>
|
||||
</group>
|
||||
|
||||
<action internal="true" class="org.jetbrains.idea.devkit.actions.ShowSerializedXmlAction" text="Show Serialized XML for Class"
|
||||
id="ShowSerializedXml">
|
||||
<add-to-group anchor="last" group-id="Internal"/>
|
||||
</action>
|
||||
</actions>
|
||||
|
||||
</idea-plugin>
|
||||
|
||||
+2
@@ -29,6 +29,7 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.wm.ToolWindowAnchor;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.openapi.wm.ex.ToolWindowEx;
|
||||
import com.intellij.openapi.wm.impl.content.ToolWindowContentUi;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.SideBorder;
|
||||
@@ -149,6 +150,7 @@ public final class DesignerToolWindowManager extends AbstractToolWindowManager {
|
||||
ToolWindowManager.getInstance(myProject)
|
||||
.registerToolWindow(DesignerBundle.message("designer.toolwindow.name"), false, ToolWindowAnchor.LEFT, myProject, true);
|
||||
myToolWindow.setIcon(UIDesignerNewIcons.ToolWindow);
|
||||
myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
|
||||
|
||||
((ToolWindowEx)myToolWindow).setTitleActions(createActions());
|
||||
|
||||
|
||||
+6
-2
@@ -24,6 +24,7 @@ import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.PopupHandler;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.SideBorder;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
@@ -43,8 +44,11 @@ public final class PropertyTablePanel extends JPanel implements ListSelectionLis
|
||||
setLayout(new GridBagLayout());
|
||||
setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));
|
||||
|
||||
add(new JLabel(DesignerBundle.message("designer.properties.title")),
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 2, 0), 0, 0));
|
||||
JLabel titleLabel = new JLabel(DesignerBundle.message("designer.properties.title"));
|
||||
titleLabel.setFont(UIUtil.getLabelFont(UIUtil.FontSize.SMALL));
|
||||
add(titleLabel,
|
||||
new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(2, 5, 2, 0), 0, 0));
|
||||
|
||||
ActionManager actionManager = ActionManager.getInstance();
|
||||
DefaultActionGroup actionGroup = new DefaultActionGroup();
|
||||
|
||||
@@ -123,17 +123,16 @@
|
||||
<action id="Merge3Files" internal="true" class="com.intellij.openapi.diff.actions.MergeFilesAction"/>
|
||||
<separator/>
|
||||
<action internal="true" id="DecodeBytesAction" class="com.intellij.internal.encodings.DecodeBytesAction"/>
|
||||
<separator/>
|
||||
<action id="DumpExtensions" internal="true" text="Dump Extensions" class="com.intellij.internal.DumpExtensionsAction"/>
|
||||
<action id="DumpInspectionDescriptions" internal="true" class="com.intellij.internal.DumpInspectionDescriptionsAction"/>
|
||||
<action id="DumpIntentionsDescriptions" internal="true" class="com.intellij.internal.DumpIntentionsAction"/>
|
||||
<action id="DumpConfigurationTypes" internal="true" class="com.intellij.internal.DumpConfigurationTypesAction"/>
|
||||
<action id="DumpDirectoryIndex" internal="true" class="com.intellij.internal.DumpDirectoryInfoAction"/>
|
||||
<separator/>
|
||||
<action id="AddTestProcessAction" internal="true" class="com.intellij.openapi.wm.impl.status.AddTestProcessAction" text="Add Test Process"/>
|
||||
<action id="AddTestProcessActionIndefinte" internal="true" class="com.intellij.openapi.wm.impl.status.AddTestProcessActionIndefinite" text="Add Test Process Indefinite"/>
|
||||
<separator/>
|
||||
<action id="TestGestureAction" class="com.intellij.openapi.keymap.impl.ui.TestGestureAction" text="Test Gesture Action"/>
|
||||
<group id="Internal.Dump" text="Dump" internal="true" popup="true">
|
||||
<action id="DumpExtensions" internal="true" text="Dump Extensions" class="com.intellij.internal.DumpExtensionsAction"/>
|
||||
<action id="DumpInspectionDescriptions" internal="true" class="com.intellij.internal.DumpInspectionDescriptionsAction"/>
|
||||
<action id="DumpIntentionsDescriptions" internal="true" class="com.intellij.internal.DumpIntentionsAction"/>
|
||||
<action id="DumpConfigurationTypes" internal="true" class="com.intellij.internal.DumpConfigurationTypesAction"/>
|
||||
<action id="DumpDirectoryIndex" internal="true" class="com.intellij.internal.DumpDirectoryInfoAction"/>
|
||||
<action id="ScanSourceCommentsAction" internal="true" class="com.intellij.tools.ScanSourceCommentsAction"
|
||||
text="Dump all comments in the project"/>
|
||||
</group>
|
||||
|
||||
<separator/>
|
||||
<group id="Internal.VFS" text="VFS" popup="true">
|
||||
<action id="VirtualFileInfo" internal="true" class="com.intellij.openapi.vfs.impl.local.VirtualFileInfoAction"/>
|
||||
@@ -143,12 +142,13 @@
|
||||
<action id="LoadAllContent" internal="true" class="com.intellij.internal.LoadAllContentsAction" text="Load all files content"/>
|
||||
<action id="LoadAllVFSContent" internal="true" class="com.intellij.internal.LoadAllVfsStoredContentsAction" text="Load all VFS stored files content"/>
|
||||
<!--<action id="ComputeVFStatistics" internal="true" class="com.intellij.internal.ComputeVirtualFileNameStatAction"/>-->
|
||||
<separator/>
|
||||
<action internal="true" id="PruneEmptyDirectories" class="com.intellij.ide.actions.PruneEmptyDirectoriesAction" text="Prune Empty Directories"/>
|
||||
<action internal="true" id="FixLineSeparators" class="com.intellij.ide.actions.FixLineSeparatorsAction" text="Fix Line Separators"/>
|
||||
</group>
|
||||
|
||||
<separator/>
|
||||
|
||||
<action id="ScanSourceCommentsAction" internal="true" class="com.intellij.tools.ScanSourceCommentsAction"
|
||||
text="Dump all comments in the project"/>
|
||||
<action internal="true" id="CompilerTest" class="com.intellij.compiler.impl.javaCompiler.api.CompilerPerfTestAction"
|
||||
text="Test Rebuild Performance"/>
|
||||
<action internal="true" id="GenerateDomModel" class="com.intellij.util.dom.generator.GenerateDomModelAction"
|
||||
|
||||
Reference in New Issue
Block a user