Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ action.evaluate.expression.dialog.switch.mode.description:
text: Code Fragment &Mode
action.evaluate.statement.dialog.switch.mode.description:
text: Expression &Mode
action.hotswap.description:
text: Reload all changed classes into application being debugged (HotSwap)
action.hotswap.text:
text: Relo_ad Changed Classes
action.interrupt.thread.text:
text: Interrupt
action.kill.process.description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
import com.intellij.java.debugger.impl.DebuggerSession;
import com.intellij.java.debugger.impl.settings.DebuggerSettings;
import com.intellij.java.debugger.impl.ui.HotSwapUI;
import com.intellij.java.debugger.localize.JavaDebuggerLocalize;
import consulo.annotation.component.ActionImpl;
import consulo.annotation.component.ActionParentRef;
import consulo.annotation.component.ActionRef;
import consulo.annotation.component.ActionRefAnchor;
import consulo.project.Project;
import consulo.ui.annotation.RequiredUIAccess;
import consulo.ui.ex.action.AnAction;
Expand All @@ -27,7 +32,19 @@
/**
* @author lex
*/
@ActionImpl(
id = "Hotswap",
parents = @ActionParentRef(
value = @ActionRef(id = "DebugMainMenu"),
anchor = ActionRefAnchor.BEFORE,
relatedToAction = @ActionRef(id = "StepOver")
)
)
public class HotSwapAction extends AnAction {
public HotSwapAction() {
super(JavaDebuggerLocalize.actionHotswapText(), JavaDebuggerLocalize.actionHotswapDescription());
}

@Override
@RequiredUIAccess
public void actionPerformed(AnActionEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
import consulo.internal.com.sun.jdi.Type;
import consulo.internal.com.sun.jdi.Value;

@ActionImpl(id = "Debugger.EditTypeSource")
@ActionImpl(id = DebuggerActions.EDIT_TYPE_SOURCE)
public class JumpToObjectAction extends DebuggerAction {
private static final Logger LOG = Logger.getInstance(JumpToObjectAction.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

import com.intellij.java.impl.javadoc.JavadocConfigurable;
import com.intellij.java.impl.javadoc.JavadocGenerationManager;
import consulo.annotation.component.ActionImpl;
import consulo.annotation.component.ActionParentRef;
import consulo.annotation.component.ActionRef;
import consulo.annotation.component.ActionRefAnchor;
import consulo.java.language.localize.JavadocLocalize;
import consulo.java.localize.JavaLocalize;
import consulo.language.editor.impl.action.BaseAnalysisAction;
Expand All @@ -32,6 +36,14 @@
import javax.swing.*;
import javax.swing.event.DocumentEvent;

@ActionImpl(
id = "GenerateJavadoc",
parents = @ActionParentRef(
value = @ActionRef(id = "ToolsBasicGroup"),
anchor = ActionRefAnchor.AFTER,
relatedToAction = @ActionRef(id = "SaveFileAsTemplate")
)
)
public final class GenerateJavadocAction extends BaseAnalysisAction {
private JavadocConfigurable myConfigurable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,56 @@
package com.intellij.java.impl.refactoring.actions;

import com.intellij.java.language.psi.PsiClassOwner;
import consulo.annotation.component.ActionImpl;
import consulo.annotation.component.ActionParentRef;
import consulo.annotation.component.ActionRef;
import consulo.annotation.component.ActionRefAnchor;
import consulo.application.dumb.DumbAware;
import consulo.java.localize.JavaRefactoringLocalize;
import consulo.language.editor.refactoring.rename.PsiElementRenameHandler;
import consulo.language.psi.PsiFile;
import consulo.project.Project;
import consulo.ui.ex.action.ActionPlaces;
import consulo.ui.ex.action.AnAction;
import consulo.ui.ex.action.AnActionEvent;
import consulo.ui.ex.action.Presentation;
import consulo.ui.annotation.RequiredUIAccess;
import consulo.ui.ex.action.*;
import consulo.virtualFileSystem.VirtualFile;

/**
* @author ven
*/
@ActionImpl(
id = "RenameFile",
parents = {
@ActionParentRef(
value = @ActionRef(id = IdeActions.GROUP_REFACTOR),
anchor = ActionRefAnchor.AFTER,
relatedToAction = @ActionRef(id = "RenameElement")
),
@ActionParentRef(
value = @ActionRef(id = "EditorTabPopupMenuEx"),
anchor = ActionRefAnchor.AFTER,
relatedToAction = @ActionRef(id = "AddAllToFavorites")
)
}
)
public class RenameFileAction extends AnAction implements DumbAware {
public void actionPerformed(final AnActionEvent e) {
final PsiFile file = e.getData(PsiFile.KEY);
assert file != null;
final VirtualFile virtualFile = file.getVirtualFile();
assert virtualFile != null;
final Project project = e.getData(Project.KEY);
assert project != null;
PsiElementRenameHandler.invoke(file, project, file, null);
}
public RenameFileAction() {
super(JavaRefactoringLocalize.actionRenameFileText(), JavaRefactoringLocalize.actionRenameFileDescription());
}

@Override
@RequiredUIAccess
public void actionPerformed(AnActionEvent e) {
PsiFile file = e.getRequiredData(PsiFile.KEY);
VirtualFile virtualFile = file.getVirtualFile();
assert virtualFile != null;
Project project = e.getRequiredData(Project.KEY);
PsiElementRenameHandler.invoke(file, project, file, null);
}

public void update(AnActionEvent e) {
PsiFile file = e.getData(PsiFile.KEY);
Presentation presentation = e.getPresentation();
boolean enabled = file instanceof PsiClassOwner && e.getPlace() != ActionPlaces.EDITOR_POPUP && e.getData(Project.KEY) != null;
presentation.setEnabled(enabled);
presentation.setVisible(enabled);
if (enabled) {
presentation.setText("Rename File...");
presentation.setDescription("Rename selected file");
@Override
public void update(AnActionEvent e) {
PsiFile file = e.getData(PsiFile.KEY);
boolean enabled = file instanceof PsiClassOwner && e.getPlace() != ActionPlaces.EDITOR_POPUP && e.hasData(Project.KEY);
e.getPresentation().setEnabledAndVisible(enabled);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ action.Generify.description:
text: Convert your code to use generic types
action.Generify.text:
text: Ge_nerify...
action.Hotswap.description:
text: Reload all changed classes into application being debugged (HotSwap)
action.Hotswap.text:
text: Relo_ad Changed Classes
action.InferNullity.description:
text: Infer nullity
action.InferNullity.text:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ a.class.can.not.be.made.an.inner.class.of.one.of.it.s.decendents:
text: A class can not be made an inner class of one of it's decendents.
action.column.header:
text: Action
action.rename.file.description:
text: Rename selected file
action.rename.file.text:
text: Rename File…
add.global.library:
text: Add library dependency
add.module.dependency:
Expand Down
15 changes: 0 additions & 15 deletions plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,4 @@
<permission type="GET_ENV"/>
<permission type="PROCESS_CREATE"/>
</permissions>

<actions>
<action id="RenameFile" class="com.intellij.java.impl.refactoring.actions.RenameFileAction">
<add-to-group group-id="RefactoringMenu" anchor="after" relative-to-action="RenameElement"/>
<add-to-group group-id="EditorTabPopupMenuEx" anchor="after" relative-to-action="AddAllToFavorites"/>
</action>

<action id="Hotswap" class="com.intellij.java.debugger.impl.actions.HotSwapAction">
<add-to-group group-id="DebugMainMenu" anchor="before" relative-to-action="StepOver"/>
</action>

<action id="GenerateJavadoc" class="com.intellij.java.impl.javadoc.actions.GenerateJavadocAction" can-use-project-as-default="true" require-module-extensions="java">
<add-to-group group-id="ToolsBasicGroup" anchor="after" relative-to-action="SaveFileAsTemplate"/>
</action>
</actions>
</consulo-plugin>
Loading