diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsDecimal.java b/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsDecimal.java deleted file mode 100644 index 9fd2f904cb3b..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsDecimal.java +++ /dev/null @@ -1,25 +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.debugger.ui.tree.actions; - -import com.intellij.debugger.settings.NodeRendererSettings; - - -public class ShowAllAsDecimal extends ShowAllAs{ - public ShowAllAsDecimal() { - super(NodeRendererSettings.getInstance().getPrimitiveRenderer()); - } -} diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsHex.java b/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsHex.java deleted file mode 100644 index 33b9172118ff..000000000000 --- a/java/debugger/impl/src/com/intellij/debugger/ui/tree/actions/ShowAllAsHex.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2000-2016 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.debugger.ui.tree.actions; - -import com.intellij.debugger.settings.NodeRendererSettings; - -public class ShowAllAsHex extends ShowAllAs { - - public ShowAllAsHex() { - super(NodeRendererSettings.getInstance().getHexRenderer()); - } -} diff --git a/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/RestoreLayoutAction.java b/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/RestoreLayoutAction.java index da9e8889fb24..d972d7e398e9 100644 --- a/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/RestoreLayoutAction.java +++ b/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/RestoreLayoutAction.java @@ -20,19 +20,25 @@ */ package com.intellij.execution.ui.layout.actions; +import com.intellij.execution.ui.layout.impl.RunnerContentUi; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.project.DumbAwareAction; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class RestoreLayoutAction extends DumbAwareAction { + @Nullable + public static RunnerContentUi getRunnerUi(@NotNull AnActionEvent e) { + return RunnerContentUi.KEY.getData(e.getDataContext()); + } @Override public void actionPerformed(@NotNull final AnActionEvent e) { - ToggleToolbarLayoutAction.getRunnerUi(e).restoreLayout(); + getRunnerUi(e).restoreLayout(); } @Override public void update(@NotNull final AnActionEvent e) { - e.getPresentation().setEnabled(ToggleToolbarLayoutAction.getRunnerUi(e) != null); + e.getPresentation().setEnabled(getRunnerUi(e) != null); } } \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/ToggleToolbarLayoutAction.java b/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/ToggleToolbarLayoutAction.java deleted file mode 100644 index ff8fd126cce8..000000000000 --- a/platform/lang-impl/src/com/intellij/execution/ui/layout/actions/ToggleToolbarLayoutAction.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2014 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.execution.ui.layout.actions; - -import com.intellij.execution.ui.layout.impl.RunnerContentUi; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.ToggleAction; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -public class ToggleToolbarLayoutAction extends ToggleAction { - @Override - public void update(@NotNull final AnActionEvent e) { - if (getRunnerUi(e) == null) { - e.getPresentation().setEnabled(false); - } - else { - super.update(e); - } - } - - @Override - public boolean isSelected(@NotNull AnActionEvent e) { - RunnerContentUi ui = getRunnerUi(e); - return ui != null && ui.isHorizontalToolbar(); - } - - @Override - public void setSelected(@NotNull AnActionEvent e, boolean state) { - RunnerContentUi ui = getRunnerUi(e); - assert ui != null; - ui.setHorizontalToolbar(state); - } - - @Nullable - public static RunnerContentUi getRunnerUi(@NotNull AnActionEvent e) { - return RunnerContentUi.KEY.getData(e.getDataContext()); - } -} diff --git a/platform/lang-impl/src/com/intellij/openapi/vfs/encoding/ConfigureFileDefaultEncodingAction.java b/platform/lang-impl/src/com/intellij/openapi/vfs/encoding/ConfigureFileDefaultEncodingAction.java deleted file mode 100644 index b22a2dab9913..000000000000 --- a/platform/lang-impl/src/com/intellij/openapi/vfs/encoding/ConfigureFileDefaultEncodingAction.java +++ /dev/null @@ -1,47 +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.openapi.vfs.encoding; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.options.ShowSettingsUtil; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import org.jetbrains.annotations.NotNull; - -public class ConfigureFileDefaultEncodingAction extends AnAction { - @Override - public void actionPerformed(@NotNull final AnActionEvent e) { - final Project project = e.getData(CommonDataKeys.PROJECT); - final VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); - - assert project != null; - final FileEncodingConfigurable configurable = new FileEncodingConfigurable(project); - ShowSettingsUtil.getInstance().editConfigurable(project, configurable, () -> { - if (virtualFile != null) { - configurable.selectFile(virtualFile); - } - }); - } - - @Override - public void update(@NotNull final AnActionEvent e) { - e.getPresentation().setEnabled(e.getData(CommonDataKeys.PROJECT) != null); - } -} diff --git a/platform/platform-impl/src/com/intellij/ide/errorTreeView/actions/TestNewErrorViewAction.java b/platform/platform-impl/src/com/intellij/ide/errorTreeView/actions/TestNewErrorViewAction.java deleted file mode 100644 index 3ff4e0f9e927..000000000000 --- a/platform/platform-impl/src/com/intellij/ide/errorTreeView/actions/TestNewErrorViewAction.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.ide.errorTreeView.actions; - -import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; -import com.intellij.openapi.project.Project; -import com.intellij.util.ui.ErrorTreeView; -import org.jetbrains.annotations.NonNls; - -/** - * @author Eugene Zhuravlev - */ -public class TestNewErrorViewAction extends TestErrorViewAction{ - @Override - protected ErrorTreeView createView(Project project) { - return new NewErrorTreeViewPanel(project, null); - } - - @Override - @NonNls - protected String getContentName() { - return "NewView"; - } -} diff --git a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareFiles.java b/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareFiles.java deleted file mode 100644 index aed0412499b4..000000000000 --- a/platform/platform-impl/src/com/intellij/openapi/diff/actions/CompareFiles.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.openapi.diff.actions; - -import com.intellij.ide.highlighter.ArchiveFileType; -import com.intellij.openapi.actionSystem.*; -import com.intellij.openapi.diff.DiffBundle; -import com.intellij.openapi.diff.DiffManager; -import com.intellij.openapi.diff.DiffRequest; -import com.intellij.openapi.diff.SimpleDiffRequest; -import com.intellij.openapi.diff.ex.DiffContentFactory; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * @deprecated use {@link com.intellij.diff.actions.CompareFilesAction} instead - */ -@Deprecated -public class CompareFiles extends BaseDiffAction { - public static final DataKey DIFF_REQUEST = DataKey.create("CompareFiles.DiffRequest"); - - @Override - public void update(@NotNull AnActionEvent e) { - Presentation presentation = e.getPresentation(); - boolean canShow = isAvailable(e); - if (ActionPlaces.isPopupPlace(e.getPlace())) { - presentation.setVisible(canShow); - } - else { - presentation.setVisible(true); - presentation.setEnabled(canShow); - } - } - - private static boolean isAvailable(@NotNull AnActionEvent e) { - final Project project = e.getData(CommonDataKeys.PROJECT); - DiffRequest diffRequest = e.getData(DIFF_REQUEST); - if (diffRequest == null) { - final VirtualFile[] virtualFiles = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); - if (virtualFiles == null || virtualFiles.length != 2) { - return false; - } - diffRequest = getDiffRequest(project, virtualFiles); - } - if (diffRequest == null) { - return false; - } - return DiffManager.getInstance().getDiffTool().canShow(diffRequest); - } - - @Override - protected DiffRequest getDiffData(DataContext dataContext) { - final Project project = CommonDataKeys.PROJECT.getData(dataContext); - final DiffRequest diffRequest = DIFF_REQUEST.getData(dataContext); - if (diffRequest != null) { - return diffRequest; - } - final VirtualFile[] data = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(dataContext); - if (data == null || data.length != 2) { - return null; - } - return getDiffRequest(project, data); - } - - @Nullable - private static DiffRequest getDiffRequest(Project project, VirtualFile[] files) { - if (files == null || files.length != 2) return null; - if (files[0].isDirectory() || files[1].isDirectory() - || files[0].getFileType() instanceof ArchiveFileType - || files[1].getFileType() instanceof ArchiveFileType) { - return null; - } - String title = DiffBundle.message("diff.element.qualified.name.vs.element.qualified.name.dialog.title", - getVirtualFileContentTitle(files [0]), - getVirtualFileContentTitle(files [1])); - SimpleDiffRequest diffRequest = DiffContentFactory.compareVirtualFiles(project, files[0], files[1], title); - if (diffRequest == null) return null; - diffRequest.setContentTitles(getVirtualFileContentTitle(files [0]), - getVirtualFileContentTitle(files [1])); - return diffRequest; - } -} diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/AddModalTestProcessAction.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/AddModalTestProcessAction.java deleted file mode 100644 index 714b6337f089..000000000000 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/AddModalTestProcessAction.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.openapi.wm.impl.status; - -import com.intellij.openapi.actionSystem.AnAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.progress.ProcessCanceledException; -import com.intellij.openapi.progress.ProgressIndicator; -import com.intellij.openapi.progress.Task; -import com.intellij.openapi.project.DumbAware; -import com.intellij.openapi.project.Project; -import org.jetbrains.annotations.NotNull; - -@SuppressWarnings({"HardCodedStringLiteral"}) -public class AddModalTestProcessAction extends AnAction implements DumbAware { - public AddModalTestProcessAction() { - super("Add Test Process"); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - final Project project = e.getData(CommonDataKeys.PROJECT); - new Task.Modal(project, "Test Process", true) { - @Override - public void run(@NotNull final ProgressIndicator indicator) { - try { - indicator.setText("welcome!"); - - Thread.sleep(6000); - - countTo(1000, new Count() { - @Override - public void onCount(int each) { - - indicator.setText("Found: " + each / 20 + 1); - if (each / 10.0 == Math.round(each / 10.0)) { - indicator.setText(null); - } - indicator.setFraction(each / 1000.0); - - try { - Thread.sleep(100); - } - catch (InterruptedException e1) { - e1.printStackTrace(); - } - - indicator.checkCanceled(); - indicator.setText2("bla bla bla"); - } - }); - indicator.stop(); - } - catch (ProcessCanceledException e1) { - try { - Thread.sleep(2000); - indicator.stop(); - } - catch (InterruptedException e2) { - e2.printStackTrace(); - } - } - catch (InterruptedException e1) { - e1.printStackTrace(); - } - } - }.queue(); - } - - private static void countTo(int top, Count count) { - for (int i = 0; i < top; i++) { - count.onCount(i); - } - } - - private interface Count { - void onCount(int each); - } -} diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index d8df47a688c4..d611ad9e89a3 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -679,7 +679,6 @@ - @@ -869,8 +868,6 @@ - - diff --git a/platform/platform-resources/src/idea/VcsActions.xml b/platform/platform-resources/src/idea/VcsActions.xml index d2a447c60ce3..e3bf804bedb8 100644 --- a/platform/platform-resources/src/idea/VcsActions.xml +++ b/platform/platform-resources/src/idea/VcsActions.xml @@ -258,10 +258,6 @@ - diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowAction.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowAction.java deleted file mode 100644 index fcc8ffe13f84..000000000000 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowAction.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2000-2014 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.xdebugger.impl.actions; - -import com.intellij.openapi.actionSystem.RegistryToggleAction; - -public class ValueTooltipAutoShowAction extends RegistryToggleAction { - public ValueTooltipAutoShowAction() { - super("debugger.valueTooltipAutoShow"); - } -} \ No newline at end of file diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowOnSelectionAction.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowOnSelectionAction.java deleted file mode 100644 index 653883fadaa3..000000000000 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/ValueTooltipAutoShowOnSelectionAction.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2000-2014 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.xdebugger.impl.actions; - -import com.intellij.openapi.actionSystem.RegistryToggleAction; - -/** - * @author Konstantin Bulenkov - */ -public class ValueTooltipAutoShowOnSelectionAction extends RegistryToggleAction { - public ValueTooltipAutoShowOnSelectionAction() { - super("debugger.valueTooltipAutoShowOnSelection"); - } -} diff --git a/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java b/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java deleted file mode 100644 index 79fad2ef1fdb..000000000000 --- a/plugins/commander/src/com/intellij/ide/actions/CommanderViewActionGroup.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package com.intellij.ide.actions; - -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.DefaultActionGroup; -import com.intellij.openapi.actionSystem.Presentation; -import com.intellij.openapi.project.DumbAware; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.wm.ToolWindowId; -import com.intellij.openapi.wm.ToolWindowManager; -import org.jetbrains.annotations.NotNull; - -public class CommanderViewActionGroup extends DefaultActionGroup implements DumbAware { - public CommanderViewActionGroup() { - super(); - } - - @Override - public void update(@NotNull AnActionEvent e){ - Presentation presentation = e.getPresentation(); - Project project = e.getProject(); - if (project == null) { - presentation.setVisible(false); - return; - } - String id = ToolWindowManager.getInstance(project).getActiveToolWindowId(); - boolean isCommanderActive = ToolWindowId.COMMANDER.equals(id); - presentation.setVisible(isCommanderActive); - } -} \ No newline at end of file diff --git a/plugins/settings-repository/src/actions/CommitToIcsAction.kt b/plugins/settings-repository/src/actions/CommitToIcsAction.kt index 9c98c807f7f0..6419876bea64 100644 --- a/plugins/settings-repository/src/actions/CommitToIcsAction.kt +++ b/plugins/settings-repository/src/actions/CommitToIcsAction.kt @@ -16,85 +16,19 @@ package org.jetbrains.settingsRepository.actions import com.intellij.openapi.components.ServiceManager -import com.intellij.openapi.components.StorageScheme import com.intellij.openapi.project.Project -import com.intellij.openapi.project.ex.ProjectEx import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.MessageDialogBuilder import com.intellij.openapi.ui.Messages import com.intellij.openapi.util.io.FileUtil -import com.intellij.openapi.vcs.CheckinProjectPanel -import com.intellij.openapi.vcs.FilePath -import com.intellij.openapi.vcs.FileStatus -import com.intellij.openapi.vcs.actions.CommonCheckinFilesAction -import com.intellij.openapi.vcs.actions.VcsContext import com.intellij.openapi.vcs.changes.Change -import com.intellij.openapi.vcs.changes.ChangeListManager -import com.intellij.openapi.vcs.changes.CommitContext -import com.intellij.openapi.vcs.changes.CommitExecutor -import com.intellij.openapi.vcs.checkin.BeforeCheckinDialogHandler -import com.intellij.openapi.vcs.checkin.CheckinHandler -import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory import com.intellij.openapi.vfs.VirtualFile -import com.intellij.project.stateStore import com.intellij.util.SmartList import org.jetbrains.settingsRepository.CommitToIcsDialog import org.jetbrains.settingsRepository.ProjectId import org.jetbrains.settingsRepository.icsManager -import org.jetbrains.settingsRepository.icsMessage import java.util.* -class CommitToIcsAction : CommonCheckinFilesAction() { - class IcsBeforeCommitDialogHandler : CheckinHandlerFactory() { - override fun createHandler(panel: CheckinProjectPanel, commitContext: CommitContext): CheckinHandler { - return CheckinHandler.DUMMY - } - - override fun createSystemReadyHandler(project: Project): BeforeCheckinDialogHandler? { - return BEFORE_CHECKIN_DIALOG_HANDLER - } - - companion object { - private val BEFORE_CHECKIN_DIALOG_HANDLER = object : BeforeCheckinDialogHandler() { - override fun beforeCommitDialogShown(project: Project, changes: List, executors: Iterable, showVcsCommit: Boolean): Boolean { - val collectConsumer = ProjectChangeCollectConsumer(project) - collectProjectChanges(changes, collectConsumer) - showDialog(project, collectConsumer, null) - return true - } - } - } - } - - override fun getActionName(dataContext: VcsContext): String = icsMessage("action.CommitToIcs.text") - - override fun isApplicableRoot(file: VirtualFile, status: FileStatus, dataContext: VcsContext): Boolean { - val project = dataContext.project - return project is ProjectEx && project.stateStore.storageScheme == StorageScheme.DIRECTORY_BASED && super.isApplicableRoot(file, status, dataContext) && !file.isDirectory && isProjectConfigFile(file, dataContext.project!!) - } - - override fun prepareRootsForCommit(roots: Array, project: Project): Array = roots - - override fun performCheckIn(context: VcsContext, project: Project, roots: Array) { - val projectId = getProjectId(project) ?: return - val changes = context.selectedChanges - val collectConsumer = ProjectChangeCollectConsumer(project) - if (changes != null && changes.isNotEmpty()) { - for (change in changes) { - collectConsumer.consume(change) - } - } - else { - val manager = ChangeListManager.getInstance(project) - for (path in getRoots(context)) { - collectProjectChanges(manager.getChangesIn(path), collectConsumer) - } - } - - showDialog(project, collectConsumer, projectId) - } -} - private class ProjectChangeCollectConsumer(private val project: Project) { private var projectChanges: MutableList? = null diff --git a/plugins/tasks/tasks-core/resources/META-INF/plugin.xml b/plugins/tasks/tasks-core/resources/META-INF/plugin.xml index d9083d968710..a0404fc033b4 100644 --- a/plugins/tasks/tasks-core/resources/META-INF/plugin.xml +++ b/plugins/tasks/tasks-core/resources/META-INF/plugin.xml @@ -86,16 +86,6 @@ - - - diff --git a/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/AssociateWithTaskAction.java b/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/AssociateWithTaskAction.java deleted file mode 100644 index ecbdeab14dff..000000000000 --- a/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/AssociateWithTaskAction.java +++ /dev/null @@ -1,75 +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.tasks.actions; - -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.actionSystem.ToggleAction; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.PlatformDataKeys; -import com.intellij.openapi.vcs.changes.ChangeList; -import com.intellij.openapi.vcs.changes.LocalChangeList; -import com.intellij.openapi.vcs.VcsDataKeys; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.project.DumbAware; -import com.intellij.tasks.TaskManager; -import org.jetbrains.annotations.NotNull; - -/** - * @author Dmitry Avdeev - */ -public class AssociateWithTaskAction extends ToggleAction implements DumbAware { - - @Override - public void update(@NotNull AnActionEvent e) { - boolean isChangelist = e.getData(VcsDataKeys.CHANGE_LISTS) == null; - e.getPresentation().setVisible(isChangelist); - if (isChangelist) { - super.update(e); - } - } - - @Override - public boolean isSelected(@NotNull AnActionEvent e) { - ChangeList[] lists = e.getData(VcsDataKeys.CHANGE_LISTS); - if (lists == null) { - return false; - } - Project project = e.getData(CommonDataKeys.PROJECT); - TaskManager manager = TaskManager.getManager(project); - for (ChangeList list : lists) { - if (list instanceof LocalChangeList && manager.getAssociatedTask((LocalChangeList)list) == null) { - return false; - } - } - return true; - } - - @Override - public void setSelected(@NotNull AnActionEvent e, boolean state) { - ChangeList[] lists = e.getData(VcsDataKeys.CHANGE_LISTS); - if (lists == null) { - return; - } - Project project = e.getData(CommonDataKeys.PROJECT); - TaskManager manager = TaskManager.getManager(project); - for (ChangeList list : lists) { - if (list instanceof LocalChangeList) { - manager.trackContext((LocalChangeList)list); - } - } - } -} diff --git a/resources/src/componentSets/Debugger.xml b/resources/src/componentSets/Debugger.xml index f7273569da6d..eb4a5e85e08f 100644 --- a/resources/src/componentSets/Debugger.xml +++ b/resources/src/componentSets/Debugger.xml @@ -28,14 +28,4 @@ - - \ No newline at end of file diff --git a/xml/dom-impl/src/com/intellij/util/xml/tree/actions/DomElementsToggleAction.java b/xml/dom-impl/src/com/intellij/util/xml/tree/actions/DomElementsToggleAction.java deleted file mode 100644 index 7de27f26d830..000000000000 --- a/xml/dom-impl/src/com/intellij/util/xml/tree/actions/DomElementsToggleAction.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2000-2016 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.util.xml.tree.actions; - -import com.intellij.icons.AllIcons; -import com.intellij.ide.TypePresentationService; -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.ToggleAction; -import com.intellij.util.xml.DomUtil; -import com.intellij.util.xml.ElementPresentationManager; -import com.intellij.util.xml.tree.AbstractDomElementNode; -import com.intellij.util.xml.tree.BaseDomElementNode; -import com.intellij.util.xml.tree.DomModelTreeView; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import java.util.HashMap; -import java.util.Map; - -public class DomElementsToggleAction extends ToggleAction { - private final DomModelTreeView myTreeView; - private final Class myClass; - private final Icon myIcon; - private final String myText; - - - public DomElementsToggleAction(final DomModelTreeView treeView, final Class aClass) { - myTreeView = treeView; - myClass = aClass; - - Icon myIcon = ElementPresentationManager.getIcon(myClass); - if (myIcon == null) { - myIcon = AllIcons.Nodes.Pointcut; - } - this.myIcon = myIcon; - - myText = TypePresentationService.getService().getTypePresentableName(myClass); - - if(getHiders() == null) DomUtil.getFile(myTreeView.getRootElement()).putUserData(AbstractDomElementNode.TREE_NODES_HIDERS_KEY, - new HashMap<>()); - - getHiders().putIfAbsent(myClass, true); - } - - @Override - public void update(@NotNull final AnActionEvent e) { - super.update(e); - - e.getPresentation().setIcon(myIcon); - e.getPresentation().setText((getHiders().get(myClass) ? "Hide ":"Show ")+myText); - - e.getPresentation().setEnabled(getHiders() != null && getHiders().get(myClass)!=null); - } - - @Override - public boolean isSelected(@NotNull AnActionEvent e) { - return getHiders().get(myClass); - } - - private Map getHiders() { - return DomUtil.getFile(myTreeView.getRootElement()).getUserData(BaseDomElementNode.TREE_NODES_HIDERS_KEY); - } - - @Override - public void setSelected(@NotNull AnActionEvent e, boolean state) { - getHiders().put(myClass, state); - myTreeView.getBuilder().updateFromRoot(); - } -} -