Search in sources :

Example 1 with BrowserHelpAction

use of com.android.tools.idea.actions.BrowserHelpAction in project android by JetBrains.

the class AllocationsView method getMainActions.

private ActionGroup getMainActions() {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new ComboBoxAction() {

        @NotNull
        @Override
        protected DefaultActionGroup createPopupActionGroup(JComponent button) {
            DefaultActionGroup group = new DefaultActionGroup();
            group.add(new ChangeGroupAction(GroupByMethod.NAME));
            group.add(new ChangeGroupAction(GroupByAllocator.NAME));
            return group;
        }

        @Override
        public void update(AnActionEvent e) {
            super.update(e);
            getTemplatePresentation().setText(myGroupBy.get(myGroupByName).getName());
            e.getPresentation().setText(myGroupBy.get(myGroupByName).getName());
        }
    });
    group.add(new EditMultipleSourcesAction());
    group.add(new ShowChartAction());
    group.add(new Separator());
    group.add(new BrowserHelpAction("Hprof Viewer", "http://developer.android.com/r/studio-ui/am-allocation.html"));
    return group;
}
Also used : BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction) ComboBoxAction(com.intellij.openapi.actionSystem.ex.ComboBoxAction) EditMultipleSourcesAction(com.android.tools.idea.actions.EditMultipleSourcesAction) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with BrowserHelpAction

use of com.android.tools.idea.actions.BrowserHelpAction in project android by JetBrains.

the class GpuMonitorView method getToolbarActions.

@Override
@NotNull
public ActionGroup getToolbarActions() {
    DefaultActionGroup group = new DefaultActionGroup();
    group.add(new RecordingAction(this));
    group.add(new Separator());
    group.add(new BrowserHelpAction("GPU monitor", PROFILING_URL));
    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 3 with BrowserHelpAction

use of com.android.tools.idea.actions.BrowserHelpAction in project android by JetBrains.

the class StringResourceViewPanel method createToolbar.

private ActionToolbar createToolbar() {
    DefaultActionGroup group = new DefaultActionGroup();
    final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("AndroidStringResourceView", group, true);
    final AnAction addKeyAction = new AnAction("Add Key", "", AllIcons.ToolbarDecorator.Add) {

        @Override
        public void update(AnActionEvent e) {
            e.getPresentation().setEnabled(myTable.getData() != null);
        }

        @Override
        public void actionPerformed(AnActionEvent e) {
            StringResourceData data = myTable.getData();
            assert data != null;
            NewStringKeyDialog dialog = new NewStringKeyDialog(myFacet, ImmutableSet.copyOf(data.getKeys()));
            if (dialog.showAndGet()) {
                StringsWriteUtils.createItem(myFacet, dialog.getResFolder(), null, dialog.getKey(), dialog.getDefaultValue(), true);
            }
        }
    };
    group.add(addKeyAction);
    group.add(new RemoveKeysAction());
    group.add(new AddLocaleAction(toolbar.getComponent()));
    group.add(newShowOnlyKeysNeedingTranslationsAction());
    group.add(new BrowserHelpAction("Translations editor", "https://developer.android.com/r/studio-ui/translations-editor.html"));
    return toolbar;
}
Also used : BrowserHelpAction(com.android.tools.idea.actions.BrowserHelpAction)

Example 4 with BrowserHelpAction

use of com.android.tools.idea.actions.BrowserHelpAction 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 5 with BrowserHelpAction

use of com.android.tools.idea.actions.BrowserHelpAction 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)

Aggregations

BrowserHelpAction (com.android.tools.idea.actions.BrowserHelpAction)7 NotNull (org.jetbrains.annotations.NotNull)6 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)5 Separator (com.intellij.openapi.actionSystem.Separator)5 RecordingAction (com.android.tools.idea.monitor.actions.RecordingAction)4 EditMultipleSourcesAction (com.android.tools.idea.actions.EditMultipleSourcesAction)1 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 ComboBoxAction (com.intellij.openapi.actionSystem.ex.ComboBoxAction)1