当前位置: 首页>>代码示例>>Java>>正文


Java IDebugUIConstants类代码示例

本文整理汇总了Java中org.eclipse.debug.ui.IDebugUIConstants的典型用法代码示例。如果您正苦于以下问题:Java IDebugUIConstants类的具体用法?Java IDebugUIConstants怎么用?Java IDebugUIConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IDebugUIConstants类属于org.eclipse.debug.ui包,在下文中一共展示了IDebugUIConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: chooseAndLaunch

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
private void chooseAndLaunch(IFile file, ILaunchConfiguration[] configs, String mode) {
	ILaunchConfiguration config = null;
	if (configs.length == 0) {
		config = createConfiguration(file);
	} else if (configs.length == 1) {
		config = configs[0];
	} else {
		config = chooseConfiguration(configs);
	}

	if (config != null) {
		Shell shell = getShell();
		DebugUITools.openLaunchConfigurationDialogOnGroup(shell, new StructuredSelection(config),
				IDebugUIConstants.ID_RUN_LAUNCH_GROUP);
	}
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:17,代码来源:OrccCodeAnalysisLaunchShortcut.java

示例2: launch

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
/**
 * Delegate method to launch the specified <code>ILaunchConfiguration</code>
 * in the specified mode
 * 
 * @param mode
 *            the mode to launch in
 * @param configuration
 *            the <code>ILaunchConfiguration</code> to launch
 */
private void launch(String mode, ILaunchConfiguration configuration) {
	if (fShowDialog) {
		/*
		 * // Offer to save dirty editors before opening the dialog as the
		 * contents // of an Ant editor often affect the contents of the
		 * dialog. if (!DebugUITools.saveBeforeLaunch()) { return; }
		 */
		IStatus status = new Status(IStatus.INFO,
				JSBuildFileUIPlugin.PLUGIN_ID, STATUS_INIT_RUN_ANT, "",
				null);
		String groupId;
		if (mode.equals(ILaunchManager.DEBUG_MODE)) {
			groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
		} else {
			groupId = org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP;
		}
		DebugUITools.openLaunchConfigurationDialog(JSBuildFileUIPlugin
				.getActiveWorkbenchWindow().getShell(), configuration,
				groupId, status);
	} else {
		DebugUITools.launch(configuration, mode);
	}
}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:33,代码来源:JSBuildFileLaunchShortcut.java

示例3: createLaunchConfig

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
protected void createLaunchConfig(IProject project) throws CoreException {
  // If the default SDK is GWT 2.7 or greater, turn on GWT super dev mode by default.
  boolean turnOnGwtSuperDevMode = GwtVersionUtil.isGwtVersionGreaterOrEqualTo27(JavaCore.create(project));

  ILaunchConfigurationWorkingCopy wc = WebAppLaunchUtil.createLaunchConfigWorkingCopy(project.getName(), project,
      WebAppLaunchUtil.determineStartupURL(project, false), false, turnOnGwtSuperDevMode);
  ILaunchGroup[] groups = DebugUITools.getLaunchGroups();

  ArrayList<String> groupsNames = new ArrayList<String>();
  for (ILaunchGroup group : groups) {
    if (IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP.equals(group.getIdentifier())
        || IDebugUIConstants.ID_RUN_LAUNCH_GROUP.equals(group.getIdentifier())) {
      groupsNames.add(group.getIdentifier());
    }
  }

  wc.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groupsNames);
  wc.doSave();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:20,代码来源:WebAppProjectCreator.java

示例4: createContributionItems

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
@Override
public void createContributionItems(IServiceLocator serviceLocator,
		IContributionRoot additions) {
	CommandContributionItemParameter toggleWatchpointParam = new CommandContributionItemParameter(serviceLocator, null, "org.eclipse.debug.ui.commands.ToggleWatchpoint", CommandContributionItem.STYLE_PUSH);
	toggleWatchpointParam.icon = DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OBJS_WATCHPOINT);
	toggleWatchpointParam.disabledIcon = DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_OBJS_WATCHPOINT_DISABLED);
	toggleWatchpointParam.label = "Add Watchpoint";
	CommandContributionItem toggleWatchpoint = new CommandContributionItem(toggleWatchpointParam);
	Expression toggleWatchpointVisible = new Expression() {
		
		@Override
		public EvaluationResult evaluate(IEvaluationContext context)
				throws CoreException {
			return EvaluationResult.valueOf((context.getVariable("activeEditor") instanceof BfEditor));
		}
	};
	additions.addContributionItem(toggleWatchpoint, toggleWatchpointVisible);
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:19,代码来源:WatchpointExtensionFactory.java

示例5: getLaunchConfigurations

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
private LaunchConfigurationElement[] getLaunchConfigurations() {
	ArrayList<ExistingLaunchConfigurationElement> result= new ArrayList<ExistingLaunchConfigurationElement>();

	try {
		ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
		ILaunchConfigurationType type= manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
		ILaunchConfiguration[] launchconfigs= manager.getLaunchConfigurations(type);

		for (int i= 0; i < launchconfigs.length; i++) {
			ILaunchConfiguration launchconfig= launchconfigs[i];
			if (!launchconfig.getAttribute(IDebugUIConstants.ATTR_PRIVATE, false)) {
				String projectName= launchconfig.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
				result.add(new ExistingLaunchConfigurationElement(launchconfig, projectName));
			}
		}
	} catch (CoreException e) {
		JavaPlugin.log(e);
	}

	return result.toArray(new LaunchConfigurationElement[result.size()]);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:FatJarPackageWizardPage.java

示例6: defineActions

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
/**
 * @param layout
 */
public void defineActions(IPageLayout layout) {
    layout.addNewWizardShortcut(PythonProjectWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonSourceFolderWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonPackageWizard.WIZARD_ID);
    layout.addNewWizardShortcut(PythonModuleWizard.WIZARD_ID);
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$

    layout.addShowViewShortcut("org.python.pydev.navigator.view");
    layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
    layout.addShowViewShortcut("org.python.pydev.debug.pyunit.pyUnitView");
    layout.addShowViewShortcut("org.python.pydev.debug.profile.ProfileView");
    layout.addShowViewShortcut("org.python.pydev.views.PyCodeCoverageView");
    layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    //layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);-- Navigator no longer supported
    layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView");
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

    layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);

}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:29,代码来源:PythonPerspectiveFactory.java

示例7: createInitialLayout

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
	IFolderLayout consoleFolder = layout.createFolder(ID_FOLDER_CONSOLE, IPageLayout.BOTTOM, (float) 0.66, layout.getEditorArea());
	consoleFolder.addView(ID_CONSOLE_VIEW);

	IFolderLayout debugFolder = layout.createFolder(ID_FOLDER_DEBUG, IPageLayout.RIGHT, (float) 0.25, ID_FOLDER_CONSOLE);

	debugFolder.addView(ID_RESULT_VIEW);
	debugFolder.addView(ID_UNIT_VIEW);
	debugFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW);
	debugFolder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW);
	debugFolder.addPlaceholder(IDebugUIConstants.ID_EXPRESSION_VIEW);
	debugFolder.addPlaceholder(IDebugUIConstants.ID_REGISTER_VIEW);

	IFolderLayout explorerFolder = layout.createFolder(ID_FOLDER_EXPLORER, IPageLayout.LEFT, (float)0.25, layout.getEditorArea()); //$NON-NLS-1$
	explorerFolder.addView(IPageLayout.ID_PROJECT_EXPLORER);

	IFolderLayout jimpleFolder = layout.createFolder(ID_FOLDER_JIMPLE, IPageLayout.RIGHT, (float) 0.33, layout.getEditorArea());
	jimpleFolder.addView(ID_JIMPLE_VIEW);

	IFolderLayout graphFolder = layout.createFolder(ID_FOLDER_GRAPH, IPageLayout.RIGHT, (float) 0.33, ID_FOLDER_JIMPLE);
	graphFolder.addView(ID_GRAPH_VIEW);

	layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
	layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);

	setContentsOfShowViewMenu(layout);
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:29,代码来源:VisuflowEditorPerspective.java

示例8: setContentsOfShowViewMenu

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
/**
 * Sets the initial contents of the "Show View" menu.
 */
protected void setContentsOfShowViewMenu(IPageLayout layout) {
	layout.addShowViewShortcut(ID_RESULT_VIEW);
	layout.addShowViewShortcut(ID_UNIT_VIEW);
	layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
	layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW);
	layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW);
	layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW);
	layout.addShowViewShortcut(IDebugUIConstants.ID_EXPRESSION_VIEW);
	layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
	layout.addShowViewShortcut(ID_CONSOLE_VIEW);
	layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
}
 
开发者ID:VisuFlow,项目名称:visuflow-plugin,代码行数:16,代码来源:VisuflowEditorPerspective.java

示例9: launchDeployJob

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
private void launchDeployJob(IProject project, Credential credential)
    throws IOException, CoreException {
  AnalyticsPingManager.getInstance().sendPing(AnalyticsEvents.APP_ENGINE_DEPLOY,
      analyticsDeployEventMetadataKey);

  IPath workDirectory = createWorkDirectory();
  DeployPreferences deployPreferences = getDeployPreferences(project);

  DeployConsole messageConsole =
      MessageConsoleUtilities.createConsole(getConsoleName(deployPreferences.getProjectId()),
                                            new DeployConsole.Factory());
  IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
  consoleManager.showConsoleView(messageConsole);
  ConsoleColorProvider colorProvider = new ConsoleColorProvider();
  MessageConsoleStream outputStream = messageConsole.newMessageStream();
  MessageConsoleStream errorStream = messageConsole.newMessageStream();
  outputStream.setActivateOnWrite(true);
  errorStream.setActivateOnWrite(true);
  outputStream.setColor(colorProvider.getColor(IDebugUIConstants.ID_STANDARD_OUTPUT_STREAM));
  errorStream.setColor(colorProvider.getColor(IDebugUIConstants.ID_STANDARD_ERROR_STREAM));

  StagingDelegate stagingDelegate = getStagingDelegate(project);

  DeployJob deploy = new DeployJob(deployPreferences, credential, workDirectory,
      outputStream, errorStream, stagingDelegate);
  messageConsole.setJob(deploy);
  deploy.addJobChangeListener(new JobChangeAdapter() {

    @Override
    public void done(IJobChangeEvent event) {
      if (event.getResult().isOK()) {
        AnalyticsPingManager.getInstance().sendPing(AnalyticsEvents.APP_ENGINE_DEPLOY_SUCCESS,
            analyticsDeployEventMetadataKey);
      }
      launchCleanupJob();
    }
  });
  deploy.schedule();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:40,代码来源:DeployCommandHandler.java

示例10: launchNew

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
private void launchNew(LaunchableResource resource, String mode) {
  try {
    ILaunchManager launchManager = getLaunchManager();

    String launchConfigurationName =
        launchManager.generateLaunchConfigurationName(resource.getLaunchName());
    ILaunchConfigurationType configurationType =
        getDataflowLaunchConfigurationType(launchManager);
    ILaunchConfigurationWorkingCopy configuration =
        configurationType.newInstance(null, launchConfigurationName);

    configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        resource.getProjectName());
    IMethod mainMethod = resource.getMainMethod();
    if (mainMethod != null && mainMethod.exists()) {
      configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
          mainMethod.getDeclaringType().getFullyQualifiedName());
    }

    String groupIdentifier =
        mode.equals(ILaunchManager.RUN_MODE) ? IDebugUIConstants.ID_RUN_LAUNCH_GROUP
            : IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
    int returnStatus =
        DebugUITools.openLaunchConfigurationDialog(DataflowUiPlugin.getActiveWindowShell(),
            configuration, groupIdentifier, null);
    if (returnStatus == Window.OK) {
      configuration.doSave();
    }
  } catch (CoreException e) {
    // TODO: Handle
    DataflowUiPlugin.logError(e, "Error while launching new Launch Configuration for project %s",
        resource.getProjectName());
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:35,代码来源:LaunchPipelineShortcut.java

示例11: runVM

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
/**
 * @param label
 * @param classToLaunch
 * @param classpath
 * @param bootClasspath
 * @param vmArgs
 * @param prgArgs
 * @param workDir
 * @param sourceLocator
 * @param debug
 * @param showInDebugger
 * @throws CoreException
 */
public void runVM(final String label, final String classToLaunch, final String[] classpath, final String[] bootClasspath, final String[] vmArgs,
        final String[] prgArgs, final String workDir, final ISourceLocator sourceLocator, final boolean debug, final boolean showInDebugger)
        throws CoreException {
    final IVMInstall vmInstall = this.getVMInstall();
    String mode = ILaunchManager.DEBUG_MODE;
    if (debug && classToLaunch.equals(WEBLOGIC_MAIN_CLASS)) {
        mode = ILaunchManager.DEBUG_MODE;
    } else {
        mode = ILaunchManager.RUN_MODE;
    }
    final IVMRunner vmRunner = vmInstall.getVMRunner(mode);

    final ILaunchConfigurationType launchType = DebugPlugin.getDefault().getLaunchManager()
            .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
    final ILaunchConfigurationWorkingCopy config = launchType.newInstance(null, label);
    config.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
    config.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, "org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector");
    DebugUITools.setLaunchPerspective(launchType, mode, IDebugUIConstants.PERSPECTIVE_DEFAULT);
    final Launch launch = new Launch(config, mode, sourceLocator);

    config.doSave();
    if (vmRunner != null) {
        final VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(classToLaunch, classpath);
        vmConfig.setVMArguments(vmArgs);
        vmConfig.setProgramArguments(prgArgs);
        if (workDir != null) {
            vmConfig.setWorkingDirectory(workDir);
        }
        if (bootClasspath.length == 0) {
            vmConfig.setBootClassPath(null);
        } else {
            vmConfig.setBootClassPath(bootClasspath);
        }
        vmRunner.run(vmConfig, launch, null);
    }
    if (showInDebugger) {
        DebugPlugin.getDefault().getLaunchManager().addLaunch(launch);
    }
}
 
开发者ID:rajendarreddyj,项目名称:eclipse-weblogic-plugin,代码行数:53,代码来源:WeblogicLauncher.java

示例12: execute

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
	DebugUITools.openLaunchConfigurationDialogOnGroup(window.getShell(), new StructuredSelection(),
			IDebugUIConstants.ID_RUN_LAUNCH_GROUP, null);
	return null;
}
 
开发者ID:dice-project,项目名称:DICE-Platform,代码行数:8,代码来源:ConfigureToolsHandler.java

示例13: launch

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
@Override
public void launch(final CloudFoundryApplicationModule appModule, final CloudFoundryServer cloudServer,
		final int appInstance, final int remoteDebugPort) throws CoreException {
	final AbstractDebugProvider provider = DebugProviderRegistry.getExistingProvider(appModule, cloudServer);

	Job job = new Job("Launching debug - " + appModule.getDeployedApplicationName()) { //$NON-NLS-1$

		protected IStatus run(IProgressMonitor monitor) {
			try {

				ILaunchConfiguration launchConfiguration = provider.getLaunchConfiguration(appModule.getLocalModule(), cloudServer.getServer(),
						appInstance, remoteDebugPort, monitor);

				DebugUITools.launch(launchConfiguration, ILaunchManager.DEBUG_MODE);
				DebugUITools.setLaunchPerspective(launchConfiguration.getType(), ILaunchManager.DEBUG_MODE,
						IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
				fireDebugChanged(cloudServer, appModule, Status.OK_STATUS);

			}
			catch (OperationCanceledException e) {
				// do nothing, debug should be cancelled without error
			}
			catch (CoreException ce) {
				CloudFoundryPlugin.getCallback().displayAndLogError(ce.getStatus());
			}
			return Status.OK_STATUS;
		}
	};

	job.setSystem(true);
	job.setPriority(Job.INTERACTIVE);
	job.schedule();

}
 
开发者ID:eclipse,项目名称:cft,代码行数:35,代码来源:ApplicationDebugUILauncher.java

示例14: debug

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
/**
 * Launch an application specified by the {@link DebugLaunch} in debug mode.
 */
public void debug(IProgressMonitor monitor) {

	try {

		if (!launch.isConnectedToDebugger() && launch.configure(monitor)) {

			ILaunchConfiguration launchConfiguration = launch.resolveLaunchConfiguration(monitor);

			DebugUITools.launch(launchConfiguration, ILaunchManager.DEBUG_MODE);
			DebugUITools.setLaunchPerspective(launchConfiguration.getType(), ILaunchManager.DEBUG_MODE,
					IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
			DebugOperations.fireDebugChanged(launch.getCloudFoundryServer(), launch.getApplicationModule(),
					Status.OK_STATUS);
		}

	}
	catch (CoreException ce) {
		DebugOperations.fireDebugChanged(launch.getCloudFoundryServer(), launch.getApplicationModule(),
				ce.getStatus());
	}
	catch (Throwable t) {
		// Catch other issues with debug launching
		IStatus status = DockerFoundryPlugin.getErrorStatus(t);
		DebugOperations.fireDebugChanged(launch.getCloudFoundryServer(), launch.getApplicationModule(), status);

		// Propagate any other error to allow Eclipse debug
		// to handle the error
		throw t;
	}

}
 
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:35,代码来源:DebugCommand.java

示例15: getManagedImage

import org.eclipse.debug.ui.IDebugUIConstants; //导入依赖的package包/类
@Override
public Image getManagedImage(Annotation annotation) {
	if (BfDebugModelPresentation.INSTRUCTION_POINTER_ANNOTATION_TYPE.equals(annotation.getType())) {
		return DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_INSTRUCTION_POINTER_TOP);
	}
	return null;
}
 
开发者ID:RichardBirenheide,项目名称:brainfuck,代码行数:8,代码来源:InstructionPointerAnnotationImageProvider.java


注:本文中的org.eclipse.debug.ui.IDebugUIConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。