Search in sources :

Example 6 with Separator

use of com.intellij.openapi.actionSystem.Separator in project android by JetBrains.

the class AndroidToolWindowFactory method getToolbarActions.

@NotNull
public ActionGroup getToolbarActions(Project project, DeviceContext deviceContext) {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new ScreenshotAction(project, deviceContext));
    group.add(new ScreenRecorderAction(project, deviceContext));
    group.add(DumpSysActions.create(project, deviceContext));
    group.add(new Separator());
    group.add(new TerminateVMAction(deviceContext));
    group.add(new HierarchyViewAction(project, deviceContext));
    group.add(new Separator());
    group.add(new BrowserHelpAction("Android Monitor", "http://developer.android.com/r/studio-ui/android-monitor.html"));
    return group;
}
Also used : BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) Separator(com.intellij.openapi.actionSystem.Separator) NotNull(org.jetbrains.annotations.NotNull)

Example 7 with Separator

use of com.intellij.openapi.actionSystem.Separator in project android by JetBrains.

the class CpuMonitorView method getToolbarActions.

@Override
@NotNull
public ActionGroup getToolbarActions() {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new RecordingAction(this));
    group.add(new Separator());
    group.add(new ToggleMethodProfilingAction(myProject, myDeviceContext));
    //group.add(new MyThreadDumpAction()); // thread dump -> systrace
    group.add(new Separator());
    group.add(new BrowserHelpAction("CPU monitor", "http://developer.android.com/r/studio-ui/am-cpu.html"));
    return group;
}
Also used : ToggleMethodProfilingAction(com.android.tools.idea.ddms.actions.ToggleMethodProfilingAction) BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction) RecordingAction(com.android.tools.idea.monitor.actions.RecordingAction) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) Separator(com.intellij.openapi.actionSystem.Separator) NotNull(org.jetbrains.annotations.NotNull)

Example 8 with Separator

use of com.intellij.openapi.actionSystem.Separator in project android by JetBrains.

the class MemoryMonitorView method getToolbarActions.

@Override
@NotNull
public ActionGroup getToolbarActions() {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new RecordingAction(this));
    group.add(new Separator());
    group.add(new GcAction(myDeviceContext));
    group.add(new DumpHprofAction(myProject, myDeviceContext, myEvents));
    group.add(new ToggleAllocationTrackingAction(myProject, myDeviceContext, myEvents));
    group.add(new Separator());
    group.add(new BrowserHelpAction("Memory monitor", "http://developer.android.com/r/studio-ui/am-memory.html"));
    if (Boolean.getBoolean("studio.profiling.debug")) {
        group.addSeparator();
        group.add(new ToggleDebugRender(myTimelineComponent));
    }
    return group;
}
Also used : ToggleDebugRender(com.android.tools.idea.monitor.memory.actions.ToggleDebugRender) GcAction(com.android.tools.idea.ddms.actions.GcAction) DumpHprofAction(com.android.tools.idea.ddms.hprof.DumpHprofAction) BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction) RecordingAction(com.android.tools.idea.monitor.actions.RecordingAction) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) Separator(com.intellij.openapi.actionSystem.Separator) ToggleAllocationTrackingAction(com.android.tools.idea.ddms.actions.ToggleAllocationTrackingAction) NotNull(org.jetbrains.annotations.NotNull)

Example 9 with Separator

use of com.intellij.openapi.actionSystem.Separator in project android by JetBrains.

the class NetworkMonitorView method getToolbarActions.

@Override
@NotNull
public ActionGroup getToolbarActions() {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new RecordingAction(this));
    group.add(new Separator());
    group.add(new BrowserHelpAction("Network monitor", "http://developer.android.com/r/studio-ui/am-network.html"));
    return group;
}
Also used : BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction) RecordingAction(com.android.tools.idea.monitor.actions.RecordingAction) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup) Separator(com.intellij.openapi.actionSystem.Separator) NotNull(org.jetbrains.annotations.NotNull)

Example 10 with Separator

use of com.intellij.openapi.actionSystem.Separator in project intellij-community by JetBrains.

the class ActionUrl method writeExternal.

@Override
public void writeExternal(Element element) throws WriteExternalException {
    for (String s : myGroupPath) {
        Element path = new Element(PATH);
        path.setAttribute(VALUE, s);
        element.addContent(path);
    }
    if (myComponent instanceof String) {
        element.setAttribute(VALUE, (String) myComponent);
        element.setAttribute(IS_ACTION, Boolean.TRUE.toString());
    } else if (myComponent instanceof Separator) {
        element.setAttribute(SEPARATOR, Boolean.TRUE.toString());
    } else if (myComponent instanceof Group) {
        final String groupId = ((Group) myComponent).getId() != null && ((Group) myComponent).getId().length() != 0 ? ((Group) myComponent).getId() : ((Group) myComponent).getName();
        element.setAttribute(VALUE, groupId != null ? groupId : "");
        element.setAttribute(IS_GROUP, Boolean.TRUE.toString());
    }
    element.setAttribute(ACTION_TYPE, Integer.toString(myActionType));
    element.setAttribute(POSITION, Integer.toString(myAbsolutePosition));
    DefaultJDOMExternalizer.writeExternal(this, element);
}
Also used : ActionGroup(com.intellij.openapi.actionSystem.ActionGroup) Group(com.intellij.openapi.keymap.impl.ui.Group) Element(org.jdom.Element) Separator(com.intellij.openapi.actionSystem.Separator)

Aggregations

Separator (com.intellij.openapi.actionSystem.Separator)11 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)7 NotNull (org.jetbrains.annotations.NotNull)6 BrowserHelpAction (com.android.tools.idea.actions.BrowserHelpAction)5 RecordingAction (com.android.tools.idea.monitor.actions.RecordingAction)4 AnAction (com.intellij.openapi.actionSystem.AnAction)4 ActionGroup (com.intellij.openapi.actionSystem.ActionGroup)2 Nullable (org.jetbrains.annotations.Nullable)2 GcAction (com.android.tools.idea.ddms.actions.GcAction)1 ToggleAllocationTrackingAction (com.android.tools.idea.ddms.actions.ToggleAllocationTrackingAction)1 ToggleMethodProfilingAction (com.android.tools.idea.ddms.actions.ToggleMethodProfilingAction)1 DumpHprofAction (com.android.tools.idea.ddms.hprof.DumpHprofAction)1 ToggleDebugRender (com.android.tools.idea.monitor.memory.actions.ToggleDebugRender)1 Pass (com.intellij.codeHighlighting.Pass)1 LineMarkerInfo (com.intellij.codeInsight.daemon.LineMarkerInfo)1 LineMarkerProviderDescriptor (com.intellij.codeInsight.daemon.LineMarkerProviderDescriptor)1 Info (com.intellij.execution.lineMarker.RunLineMarkerContributor.Info)1 AllIcons (com.intellij.icons.AllIcons)1 ActionManager (com.intellij.openapi.actionSystem.ActionManager)1 GutterIconRenderer (com.intellij.openapi.editor.markup.GutterIconRenderer)1