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:
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
@@ -41,7 +41,6 @@ public class CodeStyleSettingsManager implements PersistentStateComponent<Elemen
|
||||
LegacyCodeStyleSettingsManager legacySettingsManager = ServiceManager.getService(project, LegacyCodeStyleSettingsManager.class);
|
||||
if (legacySettingsManager != null && legacySettingsManager.getState() != null) {
|
||||
projectSettingsManager.loadState(legacySettingsManager.getState());
|
||||
projectSettingsManager.USE_PER_PROJECT_SETTINGS = true;
|
||||
LOG.info("Imported old project code style settings.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.diagnostic.logging.LogConsoleBase">
|
||||
<grid id="27dc6" binding="mySearchComponent" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="0" left="0" bottom="0" right="10"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="214" height="28"/>
|
||||
<xy x="20" y="20" width="224" height="28"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
|
||||
@@ -599,7 +599,8 @@ class RunConfigurable extends BaseConfigurable {
|
||||
|
||||
}
|
||||
if (configurationBean != null) {
|
||||
final String nameText = configurationBean.getConfigurable().getNameText();
|
||||
final SingleConfigurationConfigurable configurable = configurationBean.getConfigurable();
|
||||
final String nameText = configurable != null ? configurable.getNameText() : configurationBean.getSettings().getName();
|
||||
if (!names.add(nameText)) {
|
||||
TreeUtil.selectNode(myTree, node);
|
||||
throw new ConfigurationException("Configuration with name \'" + nameText + "\' already exist");
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.ui.components.panels.NonOpaquePanel;
|
||||
import com.intellij.ui.components.panels.Wrapper;
|
||||
import com.intellij.ui.content.*;
|
||||
@@ -459,6 +460,7 @@ public class RunnerContentUi implements ContentUI, Disposable, CellTransform.Fac
|
||||
final AnAction[] actions = groupToBuild.getChildren(null);
|
||||
if (!Arrays.equals(actions, myContextActions.get(entry.getKey()))) {
|
||||
ActionToolbar tb = myActionManager.createActionToolbar(myActionsPlace, groupToBuild, true);
|
||||
tb.getComponent().setBorder(null);
|
||||
tb.setTargetComponent(contextComponent);
|
||||
eachPlaceholder.setContent(tb.getComponent());
|
||||
}
|
||||
@@ -477,6 +479,7 @@ public class RunnerContentUi implements ContentUI, Disposable, CellTransform.Fac
|
||||
for (Map.Entry<GridImpl, Wrapper> entry : myMinimizedButtonsPlaceholder.entrySet()) {
|
||||
Wrapper eachPlaceholder = entry.getValue();
|
||||
ActionToolbar tb = myActionManager.createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, myMinimizedViewActions, true);
|
||||
tb.getComponent().setBorder(null);
|
||||
tb.setReservePlaceAutoPopupIcon(false);
|
||||
JComponent minimized = tb.getComponent();
|
||||
eachPlaceholder.setContent(minimized);
|
||||
@@ -650,6 +653,26 @@ public class RunnerContentUi implements ContentUI, Disposable, CellTransform.Fac
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.tab.action.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseAllButThisActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.all.tabs.but.this.action.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return "Select Previous Tab";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return "Select Next Tab";
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
|
||||
}
|
||||
|
||||
@@ -152,13 +152,13 @@ public class SearchTextField extends JPanel {
|
||||
myToggleHistoryLabel.setBackground(myTextField.getBackground());
|
||||
myClearFieldLabel.setBackground(myTextField.getBackground());
|
||||
|
||||
setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(4, 0, 4, 0), originalBorder));
|
||||
setBorder(new CompoundBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0), originalBorder));
|
||||
|
||||
myTextField.setOpaque(true);
|
||||
myTextField.setBorder(IdeBorderFactory.createEmptyBorder(0, 5, 0, 5));
|
||||
}
|
||||
else {
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(4, 0, 4, 0));
|
||||
setBorder(IdeBorderFactory.createEmptyBorder(2, 0, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,10 @@ public interface ContentManager extends Disposable, BusyObject {
|
||||
* @since 5.1
|
||||
*/
|
||||
String getCloseAllButThisActionName();
|
||||
|
||||
String getPreviousContentActionName();
|
||||
|
||||
String getNextContentActionName();
|
||||
|
||||
List<AnAction> getAdditionalPopupActions(@NotNull Content content);
|
||||
|
||||
|
||||
@@ -30,4 +30,9 @@ public interface ContentUI extends Disposable {
|
||||
void beforeDispose();
|
||||
|
||||
boolean canChangeSelectionTo(Content content, boolean implicit);
|
||||
|
||||
String getCloseActionName();
|
||||
String getCloseAllButThisActionName();
|
||||
String getPreviousContentActionName();
|
||||
String getNextContentActionName();
|
||||
}
|
||||
|
||||
@@ -37,9 +37,8 @@ public class CloseAction extends AnAction implements DumbAware {
|
||||
e.getData(CloseTarget.KEY).close();
|
||||
}
|
||||
|
||||
public static interface CloseTarget {
|
||||
|
||||
public static DataKey<CloseTarget> KEY = DataKey.create("GenericClosable");
|
||||
public interface CloseTarget {
|
||||
DataKey<CloseTarget> KEY = DataKey.create("GenericClosable");
|
||||
|
||||
void close();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.ShadowAction;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowContentUiType;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -45,7 +46,11 @@ public class ShowContentAction extends AnAction implements DumbAware {
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setEnabled(getWindow(e) != null);
|
||||
final ToolWindow window = getWindow(e);
|
||||
e.getPresentation().setEnabled(window != null);
|
||||
e.getPresentation().setText(window == null || window.getContentUiType() == ToolWindowContentUiType.TABBED
|
||||
? "Show List of Tabs"
|
||||
: "Show List of Views");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+11
@@ -198,6 +198,17 @@ public class ToolWindowHeadlessManagerImpl extends ToolWindowManagerEx {
|
||||
public List<AnAction> getAdditionalPopupActions(@NotNull final Content content) { return Collections.emptyList(); }
|
||||
public String getCloseActionName() { return "close"; }
|
||||
public String getCloseAllButThisActionName() { return "closeallbutthis"; }
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return "previous";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return "next";
|
||||
}
|
||||
|
||||
public JComponent getComponent() { return new JLabel(); }
|
||||
public Content getContent(final JComponent component) { return null; }
|
||||
@Nullable
|
||||
|
||||
@@ -185,7 +185,7 @@ public final class ToolWindowImpl implements ToolWindowEx {
|
||||
}
|
||||
}
|
||||
|
||||
public final void hide(final Runnable runnable) {
|
||||
public final void hide(@Nullable final Runnable runnable) {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
myToolWindowManager.hideToolWindow(myId, false);
|
||||
if (runnable != null) {
|
||||
@@ -434,7 +434,7 @@ public final class ToolWindowImpl implements ToolWindowEx {
|
||||
}
|
||||
|
||||
public void showContentPopup(InputEvent inputEvent) {
|
||||
myContentUI.toggleContentPopup(inputEvent);
|
||||
myContentUI.toggleContentPopup();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+20
@@ -164,4 +164,24 @@ class ComboContentLayout extends ContentLayout {
|
||||
public Component getComponentFor(Content content) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseActionName() {
|
||||
return "Close View";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseAllButThisActionName() {
|
||||
return "Close Other Views";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return "Select Previous View";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return "Select Next View";
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class ContentComboLabel extends BaseLabel {
|
||||
super.processMouseEvent(e);
|
||||
|
||||
if (UIUtil.isActionClick(e)) {
|
||||
myUi.toggleContentPopup(e);
|
||||
myUi.toggleContentPopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,4 +101,9 @@ abstract class ContentLayout {
|
||||
|
||||
public abstract Component getComponentFor(Content content);
|
||||
|
||||
public abstract String getCloseActionName();
|
||||
public abstract String getCloseAllButThisActionName();
|
||||
public abstract String getPreviousContentActionName();
|
||||
public abstract String getNextContentActionName();
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.wm.impl.content;
|
||||
|
||||
import com.intellij.openapi.ui.popup.ListPopup;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.ui.awt.RelativeRectangle;
|
||||
import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.content.ContentManager;
|
||||
@@ -459,4 +460,23 @@ class TabContentLayout extends ContentLayout {
|
||||
public Component getComponentFor(Content content) {
|
||||
return myContent2Tabs.get(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.tab.action.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseAllButThisActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.all.tabs.but.this.action.name");
|
||||
}
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return "Select Previous Tab";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return "Select Next Tab";
|
||||
}
|
||||
}
|
||||
|
||||
+24
-3
@@ -30,6 +30,7 @@ import com.intellij.openapi.wm.IdeFrame;
|
||||
import com.intellij.openapi.wm.ToolWindowContentUiType;
|
||||
import com.intellij.openapi.wm.impl.ToolWindowImpl;
|
||||
import com.intellij.ui.PopupHandler;
|
||||
import com.intellij.ui.UIBundle;
|
||||
import com.intellij.ui.awt.RelativeRectangle;
|
||||
import com.intellij.ui.content.*;
|
||||
import com.intellij.ui.content.tabs.PinToolwindowTabAction;
|
||||
@@ -259,7 +260,27 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
return true;
|
||||
}
|
||||
|
||||
void initMouseListeners(final JComponent c, final ToolWindowContentUi ui) {
|
||||
@Override
|
||||
public String getCloseActionName() {
|
||||
return getCurrentLayout().getCloseActionName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseAllButThisActionName() {
|
||||
return getCurrentLayout().getCloseAllButThisActionName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return getCurrentLayout().getPreviousContentActionName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return getCurrentLayout().getNextContentActionName();
|
||||
}
|
||||
|
||||
static void initMouseListeners(final JComponent c, final ToolWindowContentUi ui) {
|
||||
if (c.getClientProperty(ui) != null) return;
|
||||
|
||||
|
||||
@@ -311,7 +332,6 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
}
|
||||
|
||||
private void initActionGroup(DefaultActionGroup group, final Content content) {
|
||||
group.add(myShowContent);
|
||||
group.addSeparator();
|
||||
group.add(new TabbedContentAction.CloseAction(content));
|
||||
group.add(myCloseAllAction);
|
||||
@@ -324,6 +344,7 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
|
||||
group.add(myNextTabAction);
|
||||
group.add(myPreviousTabAction);
|
||||
group.add(myShowContent);
|
||||
group.addSeparator();
|
||||
}
|
||||
|
||||
@@ -422,7 +443,7 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
return getCurrentLayout() == layout;
|
||||
}
|
||||
|
||||
public void toggleContentPopup(InputEvent inputEvent) {
|
||||
public void toggleContentPopup() {
|
||||
if (myShouldNotShowPopup) {
|
||||
myShouldNotShowPopup = false;
|
||||
return;
|
||||
|
||||
@@ -17,10 +17,7 @@ package com.intellij.ui.content;
|
||||
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.ui.PopupHandler;
|
||||
import com.intellij.ui.TabbedPane;
|
||||
import com.intellij.ui.TabbedPaneImpl;
|
||||
import com.intellij.ui.TabbedPaneWrapper;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.content.tabs.PinToolwindowTabAction;
|
||||
import com.intellij.ui.content.tabs.TabbedContentAction;
|
||||
import com.intellij.util.IJSwingUtilities;
|
||||
@@ -324,6 +321,26 @@ public class TabbedPaneContentUI implements ContentUI, PropertyChangeListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.tab.action.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCloseAllButThisActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.all.tabs.but.this.action.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return "Select Previous Tab";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return "Select Next Tab";
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,12 +366,21 @@ public class ContentManagerImpl implements ContentManager, PropertyChangeListene
|
||||
}
|
||||
|
||||
public String getCloseActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.tab.action.name");
|
||||
return myUI.getCloseActionName();
|
||||
}
|
||||
|
||||
|
||||
public String getCloseAllButThisActionName() {
|
||||
return UIBundle.message("tabbed.pane.close.all.tabs.but.this.action.name");
|
||||
return myUI.getCloseAllButThisActionName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPreviousContentActionName() {
|
||||
return myUI.getPreviousContentActionName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextContentActionName() {
|
||||
return myUI.getNextContentActionName();
|
||||
}
|
||||
|
||||
public List<AnAction> getAdditionalPopupActions(@NotNull final Content content) {
|
||||
|
||||
@@ -147,6 +147,7 @@ public abstract class TabbedContentAction extends AnAction implements DumbAware
|
||||
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setEnabled(myManager.getContentCount() > 1);
|
||||
e.getPresentation().setText(myManager.getNextContentActionName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,6 +162,7 @@ public abstract class TabbedContentAction extends AnAction implements DumbAware
|
||||
|
||||
public void update(AnActionEvent e) {
|
||||
e.getPresentation().setEnabled(myManager.getContentCount() > 1);
|
||||
e.getPresentation().setText(myManager.getPreviousContentActionName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -736,10 +736,10 @@ action.ToggleFloatingMode.text=Floating _Mode
|
||||
action.ToggleFloatingMode.description=Float/unfloat active tool window
|
||||
action.ToggleSideMode.text=Split Mode
|
||||
action.ToggleSideMode.description=Tool windows split mode on/off
|
||||
action.ToggleContentUiTypeMode.text=Tabbed Content
|
||||
action.ToggleContentUiTypeMode.text=Show Views as Tabs
|
||||
action.ToggleContentUiTypeMode.description=Toggle between tabbed/combo presentation of contents
|
||||
action.ShowContent.text=Show Content
|
||||
action.ShowContent.description=Show tool window content popup
|
||||
action.ShowContent.text=Show List of Tabs
|
||||
action.ShowContent.description=Show a popup with the list of toolwindow tabs
|
||||
group.ResizeToolWindowGroup.text=Resize
|
||||
action.ResizeToolWindowLeft.text=Stretch to Left
|
||||
action.ResizeToolWindowLeft.description=Resize active tool window to the left
|
||||
|
||||
@@ -33,7 +33,7 @@ tabbed.pane.close.all.but.this.action.name=Close All But This
|
||||
tabbed.pane.pin.tab.action.name=Pin Tab
|
||||
tabbed.pane.pin.tab.action.description=Pin tool window tab
|
||||
tabbed.pane.close.tab.action.name=Close Tab
|
||||
tabbed.pane.close.all.tabs.but.this.action.name=Close All Tabs But This
|
||||
tabbed.pane.close.all.tabs.but.this.action.name=Close Other Tabs
|
||||
file.is.read.only.message.text=File ''{0} is read-only.
|
||||
files.are.read.only.message.text=Files {0} are read-only
|
||||
error.dialog.title=Error
|
||||
|
||||
@@ -352,7 +352,7 @@ patch.apply.command=apply patch
|
||||
shelve.changes.delete.confirm=Are you sure you want to delete the shelved changelist named ''{0}''? You will not be able to undo this operation.
|
||||
shelve.changes.delete.multiple.confirm=Are you sure you want to delete {0} shelved changelists? You will not be able to undo this operation.
|
||||
shelve.changes.delete.files.from.list=You are going to remove {0} file(s) from shelved changelist. Are you sure?
|
||||
shelve.changes.delete.files.from.list.title=Remove files from shelved changelist
|
||||
shelve.changes.delete.files.from.list.title=Remove Files from Shelved Changelist
|
||||
shelvedChanges.delete.title=Delete Shelved Changelist
|
||||
create.patch.success.confirmation=Successfully created patch {0}
|
||||
create.patch.partial.success.confirmation=Successfully created patch {0}. {1} of the selected files {1,choice,1#is|2#are} binary and {1,choice,1#was|2#were} not included in the patch.
|
||||
|
||||
@@ -173,7 +173,9 @@ public class PagedFileStorage implements Forceable {
|
||||
@NotNull
|
||||
private ByteBufferWrapper createValue(Integer key) {
|
||||
checkThreadAccess();
|
||||
PagedFileStorage owner = getRegisteredPagedFileStorageByIndex(key & FILE_INDEX_MASK);
|
||||
final int storageIndex = key & FILE_INDEX_MASK;
|
||||
PagedFileStorage owner = getRegisteredPagedFileStorageByIndex(storageIndex);
|
||||
assert owner != null: "No storage for index " + storageIndex;
|
||||
int off = (key & MAX_PAGES_COUNT) * owner.myPageSize;
|
||||
if (off > owner.length()) {
|
||||
throw new IndexOutOfBoundsException("off=" + off + " key.owner.length()=" + owner.length());
|
||||
|
||||
Reference in New Issue
Block a user