• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RefactoringWizardOpenOperation类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: activate

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
/**
 * @param refactoring
 * @param wizard
 * @param parent
 * @param dialogTitle
 * @param saveMode
 *            a save mode from {@link RefactoringSaveHelper}
 * @return <code>true</code> if the refactoring was executed,
 *         <code>false</code> otherwise
 * @throws JavaScriptModelException
 */
public boolean activate(Refactoring refactoring, RefactoringWizard wizard, Shell parent, String dialogTitle,
		int saveMode) {
	RefactoringSaveHelper saveHelper = new RefactoringSaveHelper(saveMode);
	if (!canActivate(saveHelper, parent))
		return false;

	try {
		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
		int result = op.run(parent, dialogTitle);
		fStatus = op.getInitialConditionCheckingStatus();
		if (result == IDialogConstants.CANCEL_ID
				|| result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) {
			saveHelper.triggerIncrementalBuild();
			return false;
		} else {
			return true;
		}
	} catch (InterruptedException e) {
		return false; // User action got cancelled
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:33,代码来源:RefactoringStarter.java


示例2: deleteFeatures

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
private static boolean deleteFeatures(Collection<IFeatureModel> featureModels, Shell shell) {
	try {
		Collection<IResource> projects = new HashSet<IResource>();
		for (IFeatureModel featureModel : featureModels) {
			IResource project = getProject(featureModel);
			if (project != null) {
				projects.add(project);
			}
		}

		DeleteResourcesWizard refactoringWizard = new DeleteResourcesWizard(projects.toArray(new IResource[0]));
		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(refactoringWizard);
		int returnCode = op.run(shell, TITLE_DELETE_FEATURE);
		return (returnCode != IDialogConstants.CANCEL_ID);
	} catch (InterruptedException e) {
		// cancelled
		return false;
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:20,代码来源:RefactoringSupport.java


示例3: run

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
@Override
public void run() {
    KeyTreeNode node = getNodeSelection();

    // Rename single item
    RenameKeyProcessor refactoring = new RenameKeyProcessor(node,
            getBundleGroup());

    RefactoringWizard wizard = new RenameKeyWizard(node, refactoring);
    try {
        RefactoringWizardOpenOperation operation = new RefactoringWizardOpenOperation(
                wizard);
        operation.run(getShell(), "Introduce Indirection");
    } catch (InterruptedException exception) {
        // Do nothing
    }
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:RenameKeyAction.java


示例4: activate

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) {
	RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(saveMode);
	if (! canActivate(saveHelper, parent))
		return false;

	try {
		RefactoringWizardOpenOperation op= new RefactoringWizardOpenOperation(wizard);
		int result= op.run(parent, dialogTitle);
		fStatus= op.getInitialConditionCheckingStatus();
		if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) {
			saveHelper.triggerIncrementalBuild();
			return false;
		} else {
			return true;
		}
	} catch (InterruptedException e) {
		return false; // User action got cancelled
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:RefactoringStarter.java


示例5: run

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
@Override
public void run() {
    try {
        ReplaceRefactoring refactoring = new ReplaceRefactoring(fResult, fSelection, fSkipFiltered, fSkipMatch);
        ReplaceWizard refactoringWizard = new ReplaceWizard(refactoring);
        if (fSelection == null) {
            refactoringWizard.setDefaultPageTitle(SearchMessages.ReplaceAction_title_all);
        } else {
            refactoringWizard.setDefaultPageTitle(SearchMessages.ReplaceAction_title_selected);
        }
        RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(refactoringWizard);
        op.run(fShell, SearchMessages.ReplaceAction_description_operation);
    } catch (InterruptedException e) {
        // refactoring got cancelled
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:ReplaceAction.java


示例6: deleteProducts

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
public static boolean deleteProducts(Collection<IProductModel> productModels, Shell shell) {
	try {
		Collection<IResource> productResources = new HashSet<IResource>();
		for (IProductModel productModel : productModels) {
			IProductModel editableProductModel = ProductSupport.toEditableProductModel(productModel);
			if (editableProductModel == null) {
				continue;
			}
			IResource productResource = editableProductModel.getUnderlyingResource();
			if (productModel != null) {
				productResources.add(productResource);
			}
		}

		boolean singleProduct = false;
		if (productResources.isEmpty()) {
			return true;
		} else if (productResources.size() == 1) {
			singleProduct = true;
		}

		DeleteResourcesWizard refactoringWizard = new DeleteResourcesWizard(
				productResources.toArray(new IResource[0]));
		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(refactoringWizard);
		int returnCode = op.run(shell, singleProduct ? TITLE_DELETE_PRODUCT : TITLE_DELETE_PRODUCTS);
		return (returnCode != IDialogConstants.CANCEL_ID);
	} catch (InterruptedException e) {
		// cancelled
		return false;
	}
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:32,代码来源:RefactoringSupport.java


示例7: startRename

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
private static void startRename(UMLReferencingElement<org.eclipse.uml2.uml.NamedElement> selectedEObject,
        IEditorPart editor, Shell parentShell) {
    try {
        RefactoringWizardOpenOperation openOperation = new RefactoringWizardOpenOperation(
                new RenameUMLElementRefactoringWizard(selectedEObject, editor));
        openOperation.run(parentShell, "Rename UML element");
    } catch (InterruptedException e) {
        return;
    }
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:11,代码来源:RenameUMLElementRefactoringHandler.java


示例8: run

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
/**
   * @see org.eclipse.jface.action.Action#run()
   */
  public void run() {
      KeyTreeNode node = getNodeSelection();

      // Rename single item
RenameKeyProcessor refactoring = new RenameKeyProcessor(node, getBundleGroup());

RefactoringWizard wizard = new RenameKeyWizard(node, refactoring);
try {
	RefactoringWizardOpenOperation operation= new RefactoringWizardOpenOperation(wizard);
	operation.run(getShell(), "Introduce Indirection");
} catch (InterruptedException exception) {
	// Do nothing
}
  }
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:18,代码来源:RenameKeyAction.java


示例9: runRefactoringWizard

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
protected void runRefactoringWizard(ElementRenameInfo refactoringInfo,
	ElementRenameRefactoring refactoring)
{
	ElementRenameWizard wizard = new ElementRenameWizard(refactoring, refactoringInfo);
	RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
	try
	{
		String titleForFailedChecks = ""; //$NON-NLS-1$
		op.run(getShell(), titleForFailedChecks);
	}
	catch (final InterruptedException irex)
	{
		// operation was cancelled
	}
}
 
开发者ID:mybatis,项目名称:mybatipse,代码行数:16,代码来源:ElementRenameHandler.java


示例10: run

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
public void run() {
    try {
        RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(this);

        op.run(getShell(), refactoring.getName());
    } catch (InterruptedException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:10,代码来源:PythonRefactoringWizard.java


示例11: run

import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; //导入依赖的package包/类
/**
	 * @see IActionDelegate#run(IAction)
	 */
	public void run(IAction action) {
//		MessageDialog.openInformation(shell,"Refactor Plug-in","Replace Known Tokens was executed.");
		
		Hashtable<String,String> ht = buildReplacements();
		
		XaaTemplateRefactoring refactoring = new XaaTemplateRefactoring(file,ht);
		TokenRefactoringWizard wizard = new TokenRefactoringWizard(refactoring,RefactoringWizard.DIALOG_BASED_USER_INTERFACE);
		RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
		try {
			op.run(shell,"Replace Tokens");
		} catch (InterruptedException e) {}
	}
 
开发者ID:chrisGerken,项目名称:transformAuthoring,代码行数:16,代码来源:ReplaceTokens.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BloomFilterTracker类代码示例发布时间:2022-05-22
下一篇:
Java AssertTree类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap