本文整理汇总了Java中org.eclipse.ui.console.IConsoleConstants类的典型用法代码示例。如果您正苦于以下问题:Java IConsoleConstants类的具体用法?Java IConsoleConstants怎么用?Java IConsoleConstants使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IConsoleConstants类属于org.eclipse.ui.console包,在下文中一共展示了IConsoleConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureToolBar
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
private void configureToolBar(IToolBarManager toolbarManager) {
terminateAction = new Action(Messages.actionStop) {
@Override
public void run() {
//code to execute when button is pressed
LocalAppEngineServerBehaviour serverBehaviour = console.getServerBehaviourDelegate();
if (serverBehaviour != null) {
// try to initiate a nice shutdown
boolean force = serverBehaviour.getServer().getServerState() == IServer.STATE_STOPPING;
serverBehaviour.stop(force);
}
update();
}
};
terminateAction.setToolTipText(Messages.actionStopToolTip);
terminateAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_STOP));
terminateAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_STOP));
terminateAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_STOP));
toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:22,代码来源:LocalAppEngineConsolePageParticipant.java
示例2: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
示例3: defineActions
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
private void defineActions(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.26,
editorArea);
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
IFolderLayout middleLeft = layout.createFolder("middleLeft", IPageLayout.BOTTOM, (float)
0.33, "left");
middleLeft.addView(ReportListView.ID);
middleLeft.addView(ReportListViewProject.ID);
IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.8,
editorArea);
right.addView(IConsoleConstants.ID_CONSOLE_VIEW);
right.addView(IPageLayout.ID_OUTLINE);
right.addView(IPageLayout.ID_TASK_LIST);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.8,
editorArea);
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
}
示例4: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
示例5: show
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
public void show() {
Runnable runnable = new Runnable() {
public void run() {
// this should only be called from GUI thread
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
CppcheclipsePlugin.logError("Could not show console because there is no active workbench window");
return;
}
IWorkbenchPage page = window.getActivePage();
if (page == null) {
CppcheclipsePlugin.logError("Could not show console because there is no active page");
return;
}
try {
IConsoleView view = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
view.display(messageConsole);
} catch (PartInitException e) {
CppcheclipsePlugin.logError("Could not show console", e);
}
}
};
Display.getDefault().asyncExec(runnable);
}
示例6: addFolders
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
protected void addFolders(IPageLayout layout) {
IFolderLayout leftFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, //$NON-NLS-1$
layout.getEditorArea());
leftFolder.addView(DLTKUIPlugin.ID_SCRIPT_EXPLORER);
leftFolder.addView("org.eclipse.dltk.testing.ResultView"); //$NON-NLS-1$
leftFolder.addPlaceholder("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
leftFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
IFolderLayout bottomFolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, //$NON-NLS-1$
layout.getEditorArea());
bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
bottomFolder.addView(IPageLayout.ID_TASK_LIST);
bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
bottomFolder.addPlaceholder("org.eclipse.dltk.callhierarchy.view"); //$NON-NLS-1$
bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottomFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
示例7: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
IFolderLayout top =
layout.createFolder("top", IPageLayout.TOP, 1f, editorArea); //$NON-NLS-1$
top.addView(DependencyView.ID);
top.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
IFolderLayout bottom_left =
layout.createFolder("bottom_left", IPageLayout.LEFT, 0.3f, DependencyView.ID); //$NON-NLS-1$
bottom_left.addView(MetricsView.ID);
IFolderLayout left =
layout.createFolder("left", IPageLayout.TOP, 0.7f, MetricsView.ID); //$NON-NLS-1$
left.addView(PackageTreeView.ID);
}
示例8: init
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void init(IPageBookViewPage page, IConsole console) {
IPageSite pageSite = page.getSite();
IWorkbenchPage workbenchPage = pageSite.getPage();
IViewPart viewPart = workbenchPage.findView(IConsoleConstants.ID_CONSOLE_VIEW);
IViewSite viewSite = viewPart.getViewSite();
IActionBars actionBars = viewSite.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
IContributionItem[] items = toolBarManager.getItems();
for(int i = 0; i < items.length; ++i) {
IContributionItem item = items[i];
if(item instanceof ActionContributionItem) {
IAction action = ((ActionContributionItem) item).getAction();
String text = action.getText();
if(text.equals("Pi&n Console") || text.equals("Open Console"))
toolBarManager.remove(item);
}
}
}
示例9: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
public void createInitialLayout(IPageLayout layout)
{
// Get the editor area
String editorArea = layout.getEditorArea();
// Left
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.20f, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(APP_EXPLORER_ID);
left.addPlaceholder("com.aptana.ui.io.remoteview"); //$NON-NLS-1$
// Bottom right: Console. Had to leave this programmatic to get the Console appear in bottom right
IFolderLayout bottomArea = layout.createFolder("terminalArea", IPageLayout.BOTTOM, 0.75f, //$NON-NLS-1$
editorArea);
bottomArea.addView(IConsoleConstants.ID_CONSOLE_VIEW);
bottomArea.addPlaceholder("com.aptana.terminal.views.terminal:*"); //$NON-NLS-1$
UIUtils.setCoolBarVisibility(true);
}
示例10: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
// 获取透明视图的编辑空间标示
String editerArea = layout.getEditorArea();
// 编辑器左上部视图
IFolderLayout leftTop = layout.createFolder("leftTop", IPageLayout.LEFT, 0.25f, editerArea); // 相对于‘editerArea’编辑器的位置left
leftTop.addView(ID_FOXBPM_VIEW);//FOXBPM视图
leftTop.addView(IPageLayout.ID_PROJECT_EXPLORER); // 工程视图
// 编辑器左下角视图
IFolderLayout leftBottom = layout.createFolder("leftBottom", IPageLayout.BOTTOM, 0.5f, IPageLayout.ID_PROJECT_EXPLORER); // 相对于上面‘left’视图的位置在底部
leftBottom.addView(IPageLayout.ID_OUTLINE); // OUTLINE视图
// 编辑器底部视图
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.65f, editerArea); // 相对于‘editerArea’编辑器的位置底部
bottom.addView(IPageLayout.ID_PROP_SHEET); // 属性视图
bottom.addView(ID_SERVERS_VIEW);// 服务器视图
bottom.addView(IPageLayout.ID_PROBLEM_VIEW); // 问题视图
bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);// 控制台视图
bottom.addView(ID_SEARCH_VIEW);// 搜索视图
bottom.addView(ID_HISTORY_VIEW);// 历史视图
}
示例11: createInitialLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(final IPageLayout layout) {
String editorId = layout.getEditorArea();
IFolderLayout bottom1 = layout.createFolder("bottom1", IPageLayout.BOTTOM, .75f, editorId);
bottom1.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom1.addView(IPageLayout.ID_TASK_LIST);
bottom1.addView(IConsoleConstants.ID_CONSOLE_VIEW);
IFolderLayout bottom2 = layout.createFolder("bottom2", IPageLayout.RIGHT, .5f, "bottom1");
bottom2.addView("com.github.jknack.Antlr4.syntaxDiagram");
bottom2.addView("antlr4.parseTreeView");
IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, .22f, editorId);
folder.addView(IPageLayout.ID_PROJECT_EXPLORER);
IFolderLayout outline = layout.createFolder("right", IPageLayout.RIGHT, .7f, editorId);
outline.addView(IPageLayout.ID_OUTLINE);
}
示例12: runProjectOnCodenvy
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
private void runProjectOnCodenvy(IProject project, final String mode) {
final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
final ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
if (launchConfigurationType != null) {
try {
final ILaunchConfiguration launchConfiguration =
getLaunchConfiguration(launchManager, launchConfigurationType, project,
mode);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(IConsoleConstants.ID_CONSOLE_VIEW);
DebugUITools.launch(launchConfiguration, mode);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
}
}
示例13: buildProjectOnCodenvy
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
private void buildProjectOnCodenvy(IProject project, final String mode) {
final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
final ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
if (launchConfigurationType != null) {
try {
final ILaunchConfiguration launchConfiguration =
getLaunchConfiguration(launchManager, launchConfigurationType, project,
mode);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(IConsoleConstants.ID_CONSOLE_VIEW);
DebugUITools.launch(launchConfiguration, mode);
} catch (PartInitException e) {
throw new RuntimeException(e);
}
}
}
示例14: displayConsoleView
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
private boolean displayConsoleView()
{
try
{
IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if(activeWorkbenchWindow != null) {
IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
if (activePage != null)
activePage.showView(IConsoleConstants.ID_CONSOLE_VIEW, null, IWorkbenchPage.VIEW_VISIBLE);
}
} catch(PartInitException partEx) {
return false;
}
return true;
}
示例15: defineLayout
import org.eclipse.ui.console.IConsoleConstants; //导入依赖的package包/类
/**
* @param layout
* @param editorArea
*/
public void defineLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$
topLeft.addView("org.python.pydev.navigator.view");
IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
//outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
//Add the outline only if we're not using the minimap.
if (!MinimapOverviewRulerPreferencesPage.getShowMinimapContents()) {
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
}