本文整理汇总了Java中org.eclipse.ltk.core.refactoring.Change.getName方法的典型用法代码示例。如果您正苦于以下问题:Java Change.getName方法的具体用法?Java Change.getName怎么用?Java Change.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ltk.core.refactoring.Change
的用法示例。
在下文中一共展示了Change.getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdditionalProposalInfo
import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public String getAdditionalProposalInfo(IProgressMonitor monitor) throws CoreException {
StringBuffer buf= new StringBuffer();
buf.append("<p>"); //$NON-NLS-1$
try {
Change change= getChange();
if (change != null) {
String name= change.getName();
if (name.length() == 0) {
return null;
}
buf.append(name);
} else {
return null;
}
} catch (CoreException e) {
buf.append("Unexpected error when accessing this proposal:<p><pre>"); //$NON-NLS-1$
buf.append(e.getLocalizedMessage());
buf.append("</pre>"); //$NON-NLS-1$
}
buf.append("</p>"); //$NON-NLS-1$
return buf.toString();
}
示例2: getAdditionalProposalInfo
import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
StringBuffer buf = new StringBuffer();
buf.append("<p>"); // $NON-NLS-1$
try {
Change change = getChange();
if (change != null) {
String name = change.getName();
if (name.length() == 0) {
return null;
}
buf.append(name);
} else {
return null;
}
} catch (CoreException e) {
buf.append("Unexpected error when accessing this proposal:<p><pre>"); // $NON-NLS-1$
buf.append(e.getLocalizedMessage());
buf.append("</pre>"); // $NON-NLS-1$
}
buf.append("</p>"); // $NON-NLS-1$
return buf.toString();
}
示例3: prepareChangesInfo
import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
/**
* Prepare the information about changes which were applied.
*
* @param changes array of the applied changes
* @param changesInfo prepared list of {@link ChangeInfo}
*/
public void prepareChangesInfo(Change[] changes, List<ChangeInfo> changesInfo) {
for (Change ch : changes) {
if (ch instanceof DynamicValidationStateChange) {
prepareChangesInfo(((DynamicValidationStateChange) ch).getChildren(), changesInfo);
} else {
ChangeInfo changeInfo = DtoFactory.newDto(ChangeInfo.class);
String refactoringName = ch.getName();
if (ch instanceof UndoTextFileChange) {
changeInfo.setName(ChangeInfo.ChangeName.UPDATE);
changeInfo.setPath(((CompilationUnit) ch.getModifiedElement()).getPath().toString());
}
if (refactoringName.startsWith("Rename")) {
if (ch instanceof RenameCompilationUnitChange) {
prepareRenameCompilationUnitChange(changeInfo, ch);
} else if (ch instanceof RenamePackageChange) {
prepareRenamePackageChange(changesInfo, changeInfo, ch);
}
}
if (refactoringName.startsWith("Move")) {
prepareMoveChange(changeInfo, ch);
}
changesInfo.add(changeInfo);
}
}
}
示例4: DynamicValidationStateChange
import org.eclipse.ltk.core.refactoring.Change; //导入方法依赖的package包/类
public DynamicValidationStateChange(Change change) {
super(change.getName());
add(change);
markAsSynthetic();
fSchedulingRule = ResourcesPlugin.getWorkspace().getRoot();
}