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


Java ICheatSheetManager类代码示例

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


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

示例1: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
/**
 * Main-method to start the refactoring.
 * @param params
 * 			is not used in this context.
 * @param manager
 * 			is not used in this context.
 */
@Override
public void run(String[] params, ICheatSheetManager manager) {
	CASLicenseHandlerConfiguration config = CASLicenseHandlerConfiguration.getInstance();		
	VariationPoint variationPoint = config.getVariationPoint();
	VariationPointModel vpm = config.getVariationPointModel();
	Map<String, Object> refactoringConfigurations = config.getRefactoringConfigurations();
	
	ConcreteClassifier validator = config.getLicenseValidatorClassifier();

	VariabilityRefactoring refactoring = new SemiAutomatedIfStaticConfigClassOPTXOR(validator, 
																					config.getVariantToLicenseMap());
	
	VariabilityRefactoringService refactoringService = new VariabilityRefactoringService();
	try {
           refactoringService.refactorFullyAutomated(refactoring, vpm, variationPoint, refactoringConfigurations);
       } catch (VariabilityRefactoringFailedException e) {
           LOGGER.error("The IfElseRefactoring failed.", e);
           // TODO inform user about failed refactoring
       }
	// TODO add finish action to the cheat sheet and move the following call into this action
	CASLicenseHandlerConfiguration.getInstance().refactoringFinished();
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:30,代码来源:StartCASLicenseHandlerRefactoringAction.java

示例2: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
/**
 * Main-method to start the dialog.
 * 
 * @param params
 *            is not used in this context.
 * @param manager
 *            is not used in this context.
 */
@Override
public void run(String[] params, ICheatSheetManager manager) {
    FilteredItemsSelectionDialog typeSelectionDialog = initTypeDialog(dialogTitle);
   
    int dialogResult = typeSelectionDialog.open();
    if (dialogResult != Window.OK) {
        notifyResult(false);
    } else {
        IType type = (IType) typeSelectionDialog.getResult()[0];
        Optional<ConcreteClassifier> classifier = JaMoPPRoutines.getConcreteClassifierOf(type);
        if (classifier.isPresent()) {
            processFoundClassifier(classifier.get());
            notifyResult(true);
        } else {
            openErrorMessage();
            notifyResult(false);
        }
    }
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:28,代码来源:OpenTypeDialogAction.java

示例3: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
/**
 * Main-method to start the dialog.
 * 
 * @param params
 *            is not used in this context.
 * @param manager
 *            is not used in this context.
 */
@Override
public void run(String[] params, ICheatSheetManager manager) {
    MappingDialog dialog = new MappingDialog(Display.getCurrent().getActiveShell());
    int returnCode = dialog.open();

    if (returnCode == MappingDialog.OK) {
        notifyResult(true);
        return;
    }

    if (returnCode == MappingDialog.DATA_INCOMPLETE) {
        MessageDialog.openWarning(Display.getCurrent().getActiveShell(), "Incomplete Mapping Information",
                "You did not provide all necessary mapping information. Please repeat this step.");
    }
    notifyResult(false);
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:25,代码来源:VariantToLicenseMappingAction.java

示例4: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
public void run(String[] params, ICheatSheetManager manager) {

    if ((params != null) && (params.length > 0)) {
      IWorkbench workbench = PlatformUI.getWorkbench();
      INewWizard wizard = getWizard(params[0]);
      wizard.init(workbench, new StructuredSelection());
      WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench()
          .getActiveWorkbenchWindow().getShell(), wizard);
      dialog.create();
      dialog.open();

      // did the wizard succeed ?
      notifyResult(dialog.getReturnCode() == Window.OK);
    }
  }
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:16,代码来源:OpenNewMRClassWizardAction.java

示例5: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
public void run( String[] params, ICheatSheetManager manager )
{
	this.params = params;
	IEditorPart editor = UIUtil.getActiveReportEditor( );
	if ( editor instanceof MultiPageReportEditor )
	{
		// switch to Design Page
		( (MultiPageReportEditor) editor ).setActivePage( ReportLayoutEditorFormPage.ID);

		// init some variables
		ReportLayoutEditor reportDesigner = (ReportLayoutEditor) ( (MultiPageReportEditor) editor )
				.getActivePageInstance( );
		AbstractEditPartViewer viewer = (AbstractEditPartViewer) reportDesigner
				.getGraphicalViewer( );

		// tries to select the EditPart for the item name
		selectEditPartForItemName( params[0], (MultiPageReportEditor) editor, viewer );

		// if the viewer selection contains a match for the class, proceed
		selection = matchSelectionType( viewer );
		if ( selection != null )
		{
			IAction action = getAction( reportDesigner );
			if ( action != null && action.isEnabled( ) )
			{
				action.run( );
			}
		}
		else
		{
			// show an error dialog asking to select the right element
			showErrorWrongElementSelection( );
		}
	}
	else
	{
		// show an error asking to select the right editor
		showErrorWrongEditor( );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:41,代码来源:TemplateBaseAction.java

示例6: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
public void run( String[] params, ICheatSheetManager manager )
{
	if ( this.helper != null )
	{
		this.helper.run( params, manager );
		return;
	}
	if ( params.length < 1 )
		throw new IllegalArgumentException( );
	PlatformUI.getWorkbench( )
			.getHelpSystem( )
			.displayHelpResource( params[0] );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:OpenDocAction.java

示例7: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
@Override
public void run(String[] params, ICheatSheetManager manager) {

	if (params == null || params[0] == null) {
		return;
	}
	IWorkspace workspace = ResourcesPlugin.getWorkspace();
	String projectName = params[0];
	String zipName = params[1];
	IProjectDescription newProjectDescription = workspace.newProjectDescription(projectName);
	IProject newProject = workspace.getRoot().getProject(projectName);
	try {
		newProject.create(newProjectDescription, null);
		newProject.open(null);

		URL url = this.getClass().getClassLoader().getResource(zipName);
		File f = new File(FileLocator.toFileURL(url).getPath());

		IOverwriteQuery overwriteQuery = new IOverwriteQuery() {
			public String queryOverwrite(String file) {
				System.out.println(file);
				return ALL;
			}
		};

		FileSystemStructureProvider provider = FileSystemStructureProvider.INSTANCE;

		File root = createTempDirectory();

		unzip(f.getAbsolutePath(), root.getAbsolutePath());

		List<File> files = readFiles(root.getAbsolutePath());
		ImportOperation importOperation = new ImportOperation(newProject.getFullPath(), root, provider,
				overwriteQuery, files);
		importOperation.setCreateContainerStructure(false);
		importOperation.run(new NullProgressMonitor());
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:42,代码来源:ProjectImport.java

示例8: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
public void run(String[] params, ICheatSheetManager manager) {
	run();
	notifyResult(true);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:CreateServerAction.java

示例9: run

import org.eclipse.ui.cheatsheets.ICheatSheetManager; //导入依赖的package包/类
void run(String[] params, ICheatSheetManager manager); 
开发者ID:eclipse,项目名称:birt,代码行数:2,代码来源:IOpenDocActionHelper.java


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