本文整理汇总了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;未经允许,请勿转载。 |
请发表评论