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:
@@ -86,15 +86,7 @@ public class FormatChangedTextUtil {
|
||||
return false;
|
||||
}
|
||||
final List<Range> ranges = lineStatusTracker.getRanges();
|
||||
if (ranges == null || ranges.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
for (Range range : ranges) {
|
||||
if (range.getType() != Range.DELETED) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return !ranges.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -388,7 +388,7 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
|
||||
|
||||
final Component anchor = getAnchor(pane);
|
||||
|
||||
JBPopupFactory.getInstance().createBalloonBuilder(panel.getRootPanel())
|
||||
JBPopupFactory.getInstance().createBalloonBuilder(panel.getProgressPanel())
|
||||
.setFadeoutTime(0)
|
||||
.setFillColor(Gray.TRANSPARENT)
|
||||
.setShowCallout(false)
|
||||
|
||||
+12
-1
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.wm.impl.status;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsManager;
|
||||
import com.intellij.openapi.ui.popup.IconButton;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.InplaceButton;
|
||||
@@ -48,6 +49,7 @@ public class PresentationModeProgressPanel {
|
||||
myText.setIcon(EmptyIcon.create(1, 16));
|
||||
myText2.setIcon(EmptyIcon.create(1, 16));
|
||||
}
|
||||
|
||||
public void update() {
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
@Override
|
||||
@@ -57,7 +59,15 @@ public class PresentationModeProgressPanel {
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Color getTextForeground() {
|
||||
return EditorColorsManager.getInstance().getGlobalScheme().getDefaultForeground();
|
||||
}
|
||||
|
||||
private void updateImpl() {
|
||||
myText.setForeground(getTextForeground());
|
||||
myText2.setForeground(getTextForeground());
|
||||
|
||||
if (!StringUtil.equals(myText.getText(), myProgress.getText())) {
|
||||
myText.setText(myProgress.getText());
|
||||
}
|
||||
@@ -74,7 +84,8 @@ public class PresentationModeProgressPanel {
|
||||
}
|
||||
}
|
||||
|
||||
public JPanel getRootPanel() {
|
||||
@NotNull
|
||||
public JComponent getProgressPanel() {
|
||||
return myRootPanel;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -283,7 +283,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
panel.add(toolbar, BorderLayout.EAST);
|
||||
|
||||
|
||||
panel.setBorder(new EmptyBorder(0,0,8,21));
|
||||
panel.setBorder(new EmptyBorder(0,0,8,11));
|
||||
return panel;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
ref.get().setPaintUnderline(false);
|
||||
ref.get().setNormalColor(getLinkNormalColor());
|
||||
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
|
||||
panel.setBorder(new EmptyBorder(4, 10, 4, 10));
|
||||
panel.setBorder(new EmptyBorder(4, 6, 4, 6));
|
||||
panel.add(ref.get());
|
||||
panel.add(createArrow(ref.get()), BorderLayout.EAST);
|
||||
installFocusable(panel, action, KeyEvent.VK_UP, KeyEvent.VK_DOWN, focusListOnLeft);
|
||||
@@ -346,7 +346,6 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
}
|
||||
}
|
||||
|
||||
actions.setBorder(new EmptyBorder(0, 0, 0, 0));
|
||||
WelcomeScreenActionsPanel panel = new WelcomeScreenActionsPanel();
|
||||
panel.actions.add(actions);
|
||||
return panel.root;
|
||||
@@ -366,6 +365,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
NonOpaquePanel panel = new NonOpaquePanel(new BorderLayout());
|
||||
ApplicationInfoEx app = ApplicationInfoEx.getInstanceEx();
|
||||
JLabel logo = new JLabel(IconLoader.getIcon(app.getWelcomeScreenLogoUrl()));
|
||||
logo.setBorder(new EmptyBorder(30,0,10,0));
|
||||
logo.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
panel.add(logo, BorderLayout.NORTH);
|
||||
JLabel appName = new JLabel(ApplicationNamesInfo.getInstance().getFullProductName());
|
||||
@@ -380,13 +380,13 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame {
|
||||
}
|
||||
|
||||
JLabel version = new JLabel(appVersion);
|
||||
version.setFont(font.deriveFont(16f).deriveFont(Font.PLAIN));
|
||||
version.setFont(getProductFont().deriveFont(16f));
|
||||
version.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
version.setForeground(Gray._128);
|
||||
|
||||
panel.add(appName);
|
||||
panel.add(version, BorderLayout.SOUTH);
|
||||
panel.setBorder(new EmptyBorder(20, 10, 30, 10));
|
||||
panel.setBorder(new EmptyBorder(0, 0, 20, 0));
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -98,8 +98,8 @@ public class NewRecentProjectPanel extends RecentProjectPanel {
|
||||
@Override
|
||||
protected void layoutComponents() {
|
||||
setLayout(new BorderLayout());
|
||||
myName.setBorder(new EmptyBorder(6, 5, 1, 5));
|
||||
myPath.setBorder(new EmptyBorder(1, 5, 6, 5));
|
||||
myName.setBorder(new EmptyBorder(6, 0, 1, 5));
|
||||
myPath.setBorder(new EmptyBorder(1, 0, 6, 5));
|
||||
add(myName, BorderLayout.NORTH);
|
||||
add(myPath, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
+18
@@ -141,6 +141,24 @@ public class ReformatOnlyVcsChangedTextTest extends LightPlatformTestCase {
|
||||
);
|
||||
}
|
||||
|
||||
public void testNoReformatOn_DeletionModification() throws IOException {
|
||||
doTest(
|
||||
"public class B {\n" +
|
||||
" int a = 3;\n" +
|
||||
" String text;\n" +
|
||||
" Object last = null;\n" +
|
||||
" Object first = null;\n" +
|
||||
" Object second = null;\n" +
|
||||
"}",
|
||||
|
||||
"public class B {\n" +
|
||||
" int a = 3;\n" +
|
||||
" String text;\n" +
|
||||
" Object last = null;\n" +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
|
||||
public void testModification() throws IOException {
|
||||
doTest(
|
||||
"public class B {\n" +
|
||||
|
||||
@@ -198,7 +198,7 @@ compiler.process.use.memory.temp.cache=true
|
||||
compiler.process.use.memory.temp.cache.description=Store temporary data in memory for faster compilation;\
|
||||
requires larger heap size for the build process. If parallel build is enabled, the option is ignored and temp data is always stored in memory.
|
||||
|
||||
compiler.process.preload=false
|
||||
compiler.process.preload=true
|
||||
compiler.process.preload.description=After build finishes, the IDE will pre-load and leave waiting in memory the build process for the next compilation. This will save time for process start and project model loading (may be noticeable for big projects).\
|
||||
|
||||
compiler.process.debug.port=-1
|
||||
|
||||
+7
-8
@@ -28,10 +28,7 @@ import com.intellij.openapi.vcs.diff.DiffProvider;
|
||||
import com.intellij.openapi.vcs.history.*;
|
||||
import com.intellij.openapi.vcs.impl.VcsBackgroundableActions;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.IdeBorderFactory;
|
||||
import com.intellij.ui.ScrollPaneFactory;
|
||||
import com.intellij.ui.SpeedSearchBase;
|
||||
import com.intellij.ui.TableUtil;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.dualView.TreeTableView;
|
||||
import com.intellij.ui.table.TableView;
|
||||
import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns;
|
||||
@@ -322,10 +319,12 @@ public class CompareWithSelectedRevisionAction extends AbstractVcsAction {
|
||||
|
||||
JPanel jPanel = new JPanel(new BorderLayout());
|
||||
final JScrollPane textScrollPane = ScrollPaneFactory.createScrollPane(textArea);
|
||||
textScrollPane.setBorder(IdeBorderFactory.createTitledBorder(VcsBundle.message("border.selected.revision.commit.message"), false
|
||||
));
|
||||
jPanel.add(textScrollPane, BorderLayout.SOUTH);
|
||||
|
||||
// text on title border has some problems if text font size is bigger than expected.
|
||||
final JLabel commentLabel = new JLabel(VcsBundle.message("border.selected.revision.commit.message"));
|
||||
jPanel.add(commentLabel, BorderLayout.NORTH);
|
||||
commentLabel.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP | SideBorder.LEFT | SideBorder.BOTTOM));
|
||||
textScrollPane.setBorder(null);
|
||||
jPanel.add(textScrollPane, BorderLayout.CENTER);
|
||||
jPanel.setPreferredSize(new Dimension(300, 100));
|
||||
return jPanel;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.vcs.impl;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.DefaultActionGroup;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
@@ -33,6 +34,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ex.ProjectEx;
|
||||
import com.intellij.openapi.roots.FileIndexFacade;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.SimpleToolWindowPanel;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
@@ -57,6 +59,7 @@ import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowAnchor;
|
||||
import com.intellij.openapi.wm.ToolWindowId;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.openapi.wm.ex.ToolWindowEx;
|
||||
import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.content.ContentFactory;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
@@ -238,6 +241,9 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
|
||||
toolWindowManager.registerToolWindow(ToolWindowId.VCS, true, ToolWindowAnchor.BOTTOM, myProject, true);
|
||||
myContentManager = toolWindow.getContentManager();
|
||||
toolWindow.setIcon(AllIcons.Toolwindows.VcsSmallTab);
|
||||
DefaultActionGroup gearActions = new DefaultActionGroup();
|
||||
gearActions.addAction(SimpleToolWindowPanel.createToggleToolbarAction(myProject, toolWindow)).setAsSecondary(true);
|
||||
((ToolWindowEx)toolWindow).setAdditionalGearActions(gearActions);
|
||||
toolWindow.installWatcher(myContentManager);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user