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


Java RefactoringDescriptor.STRUCTURAL_CHANGE属性代码示例

本文整理汇总了Java中org.eclipse.ltk.core.refactoring.RefactoringDescriptor.STRUCTURAL_CHANGE属性的典型用法代码示例。如果您正苦于以下问题:Java RefactoringDescriptor.STRUCTURAL_CHANGE属性的具体用法?Java RefactoringDescriptor.STRUCTURAL_CHANGE怎么用?Java RefactoringDescriptor.STRUCTURAL_CHANGE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.ltk.core.refactoring.RefactoringDescriptor的用法示例。


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

示例1: createChange

@Override
public Change createChange(IProgressMonitor monitor) throws CoreException {
	try {
		monitor.beginTask("", 1); //$NON-NLS-1$
		final String description= Messages.format(RefactoringCoreMessages.RenameJavaProjectProcessor_descriptor_description_short, BasicElementLabels.getJavaElementName(fProject.getElementName()));
		final String header= Messages.format(RefactoringCoreMessages.RenameJavaProjectChange_descriptor_description, new String[] { BasicElementLabels.getJavaElementName(fProject.getElementName()), BasicElementLabels.getJavaElementName(getNewElementName())});
		final String comment= new JDTRefactoringDescriptorComment(null, this, header).asString();
		final int flags= RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE | RefactoringDescriptor.BREAKING_CHANGE;
		final RenameJavaElementDescriptor descriptor= RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_JAVA_PROJECT);
		descriptor.setProject(null);
		descriptor.setDescription(description);
		descriptor.setComment(comment);
		descriptor.setFlags(flags);
		descriptor.setJavaElement(fProject);
		descriptor.setNewName(getNewElementName());
		descriptor.setUpdateReferences(fUpdateReferences);
		return new DynamicValidationRefactoringChange(descriptor, RefactoringCoreMessages.RenameJavaProjectRefactoring_rename, new Change[] { new RenameJavaProjectChange(fProject, getNewElementName(), fUpdateReferences)});
	} finally {
		monitor.done();
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:21,代码来源:RenameJavaProjectProcessor.java

示例2: getDescriptor

public final ChangeDescriptor getDescriptor() {
	final Map<String, String> arguments= new HashMap<String, String>();
	final int length= fJavaElements.length;
	final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
	final IProject resource= getSingleProject();
	final String project= resource != null ? resource.getName() : null;
	final String header= length == 1 ? Messages.format(getHeaderPatternSingular(), new String[] {
			JavaElementLabels.getTextLabel(fJavaElements[0].getElementName(), JavaElementLabels.ALL_FULLY_QUALIFIED), getDestinationLabel() }) : Messages.format(getHeaderPatternPlural(),
			new String[] { String.valueOf(length), getDestinationLabel() });
	int flags= JavaRefactoringDescriptor.JAR_REFACTORING | JavaRefactoringDescriptor.JAR_MIGRATION | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	arguments.put(ATTRIBUTE_POLICY, getPolicyId());
	arguments.put(ATTRIBUTE_MEMBERS, new Integer(fJavaElements.length).toString());
	for (int offset= 0; offset < fJavaElements.length; offset++)
		arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + (offset + 1), JavaRefactoringDescriptorUtil.elementToHandle(project, fJavaElements[offset]));
	arguments.putAll(getRefactoringArguments(project));
	final JavaRefactoringDescriptor descriptor= createRefactoringDescriptor(comment, arguments, description, project, flags);
	return new RefactoringChangeDescriptor(descriptor);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:19,代码来源:ReorgPolicyFactory.java

示例3: getDescriptor

public final ChangeDescriptor getDescriptor() {
	final Map<String, String> arguments= new HashMap<String, String>();
	final int length= fFiles.length + fFolders.length + fCus.length;
	final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
	final IProject resource= getSingleProject();
	final String project= resource != null ? resource.getName() : null;
	final String header= length == 1 ? Messages.format(getHeaderPatternSingular(), new String[] { getSingleElementName(), getDestinationLabel() }) : Messages.format(
			getHeaderPatternPlural(),
			new String[] { String.valueOf(length), getDestinationLabel() });
	int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	arguments.put(ATTRIBUTE_POLICY, getPolicyId());
	arguments.put(ATTRIBUTE_FILES, new Integer(fFiles.length).toString());
	for (int offset= 0; offset < fFiles.length; offset++)
		arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + (offset + 1), JavaRefactoringDescriptorUtil.resourceToHandle(project, fFiles[offset]));
	arguments.put(ATTRIBUTE_FOLDERS, new Integer(fFolders.length).toString());
	for (int offset= 0; offset < fFolders.length; offset++)
		arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + (offset + fFiles.length + 1), JavaRefactoringDescriptorUtil.resourceToHandle(project, fFolders[offset]));
	arguments.put(ATTRIBUTE_UNITS, new Integer(fCus.length).toString());
	for (int offset= 0; offset < fCus.length; offset++)
		arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + (offset + fFolders.length + fFiles.length + 1), JavaRefactoringDescriptorUtil.elementToHandle(project, fCus[offset]));
	arguments.putAll(getRefactoringArguments(project));
	final JavaRefactoringDescriptor descriptor= createRefactoringDescriptor(comment, arguments, description, project, flags);
	return new RefactoringChangeDescriptor(descriptor);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:25,代码来源:ReorgPolicyFactory.java

示例4: createRefactoringDescriptor

private RenameJavaElementDescriptor createRefactoringDescriptor() {
	String project= null;
	IJavaProject javaProject= fPackage.getJavaProject();
	if (javaProject != null)
		project= javaProject.getElementName();
	final int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
	final String description= Messages.format(RefactoringCoreMessages.RenamePackageProcessor_descriptor_description_short, getElementLabel(fPackage));
	final String header= Messages.format(RefactoringCoreMessages.RenamePackageProcessor_descriptor_description, new String[] { getElementLabel(fPackage), getNewElementName()});
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	if (fRenameSubpackages)
		comment.addSetting(RefactoringCoreMessages.RenamePackageProcessor_rename_subpackages);
	final RenameJavaElementDescriptor descriptor= RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_PACKAGE);
	descriptor.setProject(project);
	descriptor.setDescription(description);
	descriptor.setComment(comment.asString());
	descriptor.setFlags(flags);
	descriptor.setJavaElement(fPackage);
	descriptor.setNewName(getNewElementName());
	descriptor.setUpdateReferences(fUpdateReferences);
	descriptor.setUpdateTextualOccurrences(fUpdateTextualMatches);
	descriptor.setUpdateQualifiedNames(fUpdateQualifiedNames);
	if (fUpdateQualifiedNames && fFilePatterns != null && !"".equals(fFilePatterns)) //$NON-NLS-1$
		descriptor.setFileNamePatterns(fFilePatterns);
	descriptor.setUpdateHierarchy(fRenameSubpackages);
	return descriptor;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:26,代码来源:RenamePackageProcessor.java

示例5: createChange

@Override
public Change createChange(IProgressMonitor pm) throws CoreException {
	// TODO: update for fSelectionStart == -1
	final Map<String, String> arguments= new HashMap<String, String>();
	String project= null;
	IJavaProject javaProject= fSelectionTypeRoot.getJavaProject();
	if (javaProject != null)
		project= javaProject.getElementName();
	final IMethodBinding binding= fSourceProvider.getDeclaration().resolveBinding();
	int flags= RefactoringDescriptor.STRUCTURAL_CHANGE | JavaRefactoringDescriptor.JAR_REFACTORING | JavaRefactoringDescriptor.JAR_SOURCE_ATTACHMENT;
	if (!Modifier.isPrivate(binding.getModifiers()))
		flags|= RefactoringDescriptor.MULTI_CHANGE;
	final String description= Messages.format(RefactoringCoreMessages.ReplaceInvocationsRefactoring_descriptor_description_short, BasicElementLabels.getJavaElementName(binding.getName()));
	final String header= Messages.format(RefactoringCoreMessages.ReplaceInvocationsRefactoring_descriptor_description, new String[] { BindingLabelProvider.getBindingLabel(binding, JavaElementLabels.ALL_FULLY_QUALIFIED), BindingLabelProvider.getBindingLabel(binding.getDeclaringClass(), JavaElementLabels.ALL_FULLY_QUALIFIED)});
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	comment.addSetting(Messages.format(RefactoringCoreMessages.ReplaceInvocationsRefactoring_original_pattern, BindingLabelProvider.getBindingLabel(binding, JavaElementLabels.ALL_FULLY_QUALIFIED)));
	if (!fTargetProvider.isSingle())
		comment.addSetting(RefactoringCoreMessages.ReplaceInvocationsRefactoring_replace_references);
	final JavaRefactoringDescriptor descriptor= new JavaRefactoringDescriptor(ID_REPLACE_INVOCATIONS, project, description, comment.asString(), arguments, flags){}; //REVIEW Unregistered ID!
	arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT, JavaRefactoringDescriptorUtil.elementToHandle(project, fSelectionTypeRoot));
	arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_SELECTION, new Integer(fSelectionStart).toString() + " " + new Integer(fSelectionLength).toString()); //$NON-NLS-1$
	arguments.put(ATTRIBUTE_MODE, new Integer(fTargetProvider.isSingle() ? 0 : 1).toString());
	return new DynamicValidationRefactoringChange(descriptor, RefactoringCoreMessages.ReplaceInvocationsRefactoring_change_name, fChangeManager.getAllChanges());
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:24,代码来源:ReplaceInvocationsRefactoring.java

示例6: getDescriptorFlags

protected int getDescriptorFlags() {
  int flags =
      JavaRefactoringDescriptor.JAR_MIGRATION
          | JavaRefactoringDescriptor.JAR_REFACTORING
          | RefactoringDescriptor.STRUCTURAL_CHANGE;
  try {
    if (!Flags.isPrivate(fMethod.getFlags())) flags |= RefactoringDescriptor.MULTI_CHANGE;
    final IType declaring = fMethod.getDeclaringType();
    if (declaring.isAnonymous() || declaring.isLocal())
      flags |= JavaRefactoringDescriptor.JAR_SOURCE_ATTACHMENT;
  } catch (JavaModelException exception) {
    JavaPlugin.log(exception);
  }
  return flags;
}
 
开发者ID:eclipse,项目名称:che,代码行数:15,代码来源:ChangeSignatureProcessor.java

示例7: createRefactoringDescriptor

private RenameJavaElementDescriptor createRefactoringDescriptor() {
  String project = null;
  IJavaProject javaProject = fPackage.getJavaProject();
  if (javaProject != null) project = javaProject.getElementName();
  final int flags =
      JavaRefactoringDescriptor.JAR_MIGRATION
          | JavaRefactoringDescriptor.JAR_REFACTORING
          | RefactoringDescriptor.STRUCTURAL_CHANGE
          | RefactoringDescriptor.MULTI_CHANGE;
  final String description =
      Messages.format(
          RefactoringCoreMessages.RenamePackageProcessor_descriptor_description_short,
          getElementLabel(fPackage));
  final String header =
      Messages.format(
          RefactoringCoreMessages.RenamePackageProcessor_descriptor_description,
          new String[] {getElementLabel(fPackage), getNewElementName()});
  final JDTRefactoringDescriptorComment comment =
      new JDTRefactoringDescriptorComment(project, this, header);
  if (fRenameSubpackages)
    comment.addSetting(RefactoringCoreMessages.RenamePackageProcessor_rename_subpackages);
  final RenameJavaElementDescriptor descriptor =
      RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(
          IJavaRefactorings.RENAME_PACKAGE);
  descriptor.setProject(project);
  descriptor.setDescription(description);
  descriptor.setComment(comment.asString());
  descriptor.setFlags(flags);
  descriptor.setJavaElement(fPackage);
  descriptor.setNewName(getNewElementName());
  descriptor.setUpdateReferences(fUpdateReferences);
  descriptor.setUpdateTextualOccurrences(fUpdateTextualMatches);
  descriptor.setUpdateQualifiedNames(fUpdateQualifiedNames);
  if (fUpdateQualifiedNames && fFilePatterns != null && !"".equals(fFilePatterns)) // $NON-NLS-1$
  descriptor.setFileNamePatterns(fFilePatterns);
  descriptor.setUpdateHierarchy(fRenameSubpackages);
  return descriptor;
}
 
开发者ID:eclipse,项目名称:che,代码行数:38,代码来源:RenamePackageProcessor.java

示例8: getDescriptor

public final ChangeDescriptor getDescriptor() {
  final Map<String, String> arguments = new HashMap<String, String>();
  final int length = fPackageFragmentRoots.length;
  final String description = length == 1 ? getDescriptionSingular() : getDescriptionPlural();
  final IProject resource = getSingleProject();
  final String project = resource != null ? resource.getName() : null;
  final String header =
      length == 1
          ? Messages.format(
              getHeaderPatternSingular(),
              new String[] {fPackageFragmentRoots[0].getElementName(), getDestinationLabel()})
          : Messages.format(
              getHeaderPatternPlural(),
              new String[] {String.valueOf(length), getDestinationLabel()});
  int flags = RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
  final JDTRefactoringDescriptorComment comment =
      new JDTRefactoringDescriptorComment(project, this, header);
  arguments.put(ATTRIBUTE_POLICY, getPolicyId());
  arguments.put(ATTRIBUTE_ROOTS, new Integer(fPackageFragmentRoots.length).toString());
  for (int offset = 0; offset < fPackageFragmentRoots.length; offset++)
    arguments.put(
        JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + (offset + 1),
        JavaRefactoringDescriptorUtil.elementToHandle(project, fPackageFragmentRoots[offset]));
  arguments.putAll(getRefactoringArguments(project));
  final JavaRefactoringDescriptor descriptor =
      createRefactoringDescriptor(comment, arguments, description, project, flags);
  return new RefactoringChangeDescriptor(descriptor);
}
 
开发者ID:eclipse,项目名称:che,代码行数:28,代码来源:ReorgPolicyFactory.java

示例9: JavaRefactoringDescriptor

/**
 * Creates a new java refactoring descriptor.
 *
 * @param id the unique id of the refactoring
 */
protected JavaRefactoringDescriptor(final String id) {
  this(
      id,
      null,
      DescriptorMessages.JavaRefactoringDescriptor_not_available,
      null,
      new HashMap(),
      RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE);
}
 
开发者ID:eclipse,项目名称:che,代码行数:14,代码来源:JavaRefactoringDescriptor.java

示例10: DeleteResourcesDescriptor

/**
 * Creates a new refactoring descriptor.
 *
 * <p>Clients should not instantiated this class but use {@link
 * RefactoringCore#getRefactoringContribution(String)} with {@link #ID} to get the contribution
 * that can create the descriptor.
 */
public DeleteResourcesDescriptor() {
  super(
      ID,
      null,
      RefactoringCoreMessages.RenameResourceDescriptor_unnamed_descriptor,
      null,
      RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE);
  fDeleteContents = false;
}
 
开发者ID:eclipse,项目名称:che,代码行数:16,代码来源:DeleteResourcesDescriptor.java

示例11: RenameResourceDescriptor

/**
 * Creates a new refactoring descriptor.
 *
 * <p>Clients should not instantiated this class but use {@link
 * RefactoringCore#getRefactoringContribution(String)} with {@link #ID} to get the contribution
 * that can create the descriptor.
 */
public RenameResourceDescriptor() {
  super(
      ID,
      null,
      RefactoringCoreMessages.RenameResourceDescriptor_unnamed_descriptor,
      null,
      RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE);
  fResourcePath = null;
  fNewName = null;
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:RenameResourceDescriptor.java

示例12: MoveResourcesDescriptor

/**
 * Creates a new refactoring descriptor.
 *
 * <p>Clients should not instantiated this class but use {@link
 * RefactoringCore#getRefactoringContribution(String)} with {@link #ID} to get the contribution
 * that can create the descriptor.
 */
public MoveResourcesDescriptor() {
  super(
      ID,
      null,
      RefactoringCoreMessages.MoveResourcesDescriptor_unnamed_descriptor,
      null,
      RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE);
  fResourcePathsToMove = null;
  fDestinationPath = null;
  fUpdateReferences = true;
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:MoveResourcesDescriptor.java

示例13: getDescriptorFlags

protected int getDescriptorFlags() {
	int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE;
	try {
		if (!Flags.isPrivate(fMethod.getFlags()))
			flags|= RefactoringDescriptor.MULTI_CHANGE;
		final IType declaring= fMethod.getDeclaringType();
		if (declaring.isAnonymous() || declaring.isLocal())
			flags|= JavaRefactoringDescriptor.JAR_SOURCE_ATTACHMENT;
	} catch (JavaModelException exception) {
		JavaPlugin.log(exception);
	}
	return flags;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:13,代码来源:ChangeSignatureProcessor.java

示例14: createRefactoringDescriptor

private ExtractConstantDescriptor createRefactoringDescriptor() {
	final Map<String, String> arguments= new HashMap<String, String>();
	String project= null;
	IJavaProject javaProject= fCu.getJavaProject();
	if (javaProject != null)
		project= javaProject.getElementName();
	int flags= JavaRefactoringDescriptor.JAR_REFACTORING | JavaRefactoringDescriptor.JAR_SOURCE_ATTACHMENT;
	if (JdtFlags.getVisibilityCode(fVisibility) != Modifier.PRIVATE)
		flags|= RefactoringDescriptor.STRUCTURAL_CHANGE;

	final String expression= ASTNodes.asString(fSelectedExpression.getAssociatedExpression());
	final String description= Messages.format(RefactoringCoreMessages.ExtractConstantRefactoring_descriptor_description_short, BasicElementLabels.getJavaElementName(fConstantName));
	final String header= Messages.format(RefactoringCoreMessages.ExtractConstantRefactoring_descriptor_description, new String[] { BasicElementLabels.getJavaElementName(fConstantName), BasicElementLabels.getJavaCodeString(expression)});
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	comment.addSetting(Messages.format(RefactoringCoreMessages.ExtractConstantRefactoring_constant_name_pattern, BasicElementLabels.getJavaElementName(fConstantName)));
	comment.addSetting(Messages.format(RefactoringCoreMessages.ExtractConstantRefactoring_constant_expression_pattern, BasicElementLabels.getJavaCodeString(expression)));
	String visibility= fVisibility;
	if ("".equals(visibility)) //$NON-NLS-1$
		visibility= RefactoringCoreMessages.ExtractConstantRefactoring_default_visibility;
	comment.addSetting(Messages.format(RefactoringCoreMessages.ExtractConstantRefactoring_visibility_pattern, visibility));
	if (fReplaceAllOccurrences)
		comment.addSetting(RefactoringCoreMessages.ExtractConstantRefactoring_replace_occurrences);
	if (fQualifyReferencesWithDeclaringClassName)
		comment.addSetting(RefactoringCoreMessages.ExtractConstantRefactoring_qualify_references);
	arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT, JavaRefactoringDescriptorUtil.elementToHandle(project, fCu));
	arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME, fConstantName);
	arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_SELECTION, new Integer(fSelectionStart).toString() + " " + new Integer(fSelectionLength).toString()); //$NON-NLS-1$
	arguments.put(ATTRIBUTE_REPLACE, Boolean.valueOf(fReplaceAllOccurrences).toString());
	arguments.put(ATTRIBUTE_QUALIFY, Boolean.valueOf(fQualifyReferencesWithDeclaringClassName).toString());
	arguments.put(ATTRIBUTE_VISIBILITY, new Integer(JdtFlags.getVisibilityCode(fVisibility)).toString());

	ExtractConstantDescriptor descriptor= RefactoringSignatureDescriptorFactory.createExtractConstantDescriptor(project, description, comment.asString(), arguments, flags);
	return descriptor;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:34,代码来源:ExtractConstantRefactoring.java

示例15: createDescriptor

private MoveStaticMembersDescriptor createDescriptor() {
	final IMember[] members= getMembersToMove();
	String project= null;
	final IJavaProject javaProject= getDeclaringType().getJavaProject();
	if (javaProject != null)
		project= javaProject.getElementName();
	String header= null;
	if (members.length == 1)
		header= Messages.format(RefactoringCoreMessages.MoveStaticMembersProcessor_descriptor_description_single, new String[] { JavaElementLabels.getElementLabel(members[0], JavaElementLabels.ALL_FULLY_QUALIFIED), getQualifiedTypeLabel(fDestinationType) });
	else
		header= Messages.format(RefactoringCoreMessages.MoveStaticMembersProcessor_descriptor_description_multi, new String[] { String.valueOf(members.length), getQualifiedTypeLabel(fDestinationType) });
	int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
	final IType declaring= members[0].getDeclaringType();
	try {
		if (declaring.isLocal() || declaring.isAnonymous())
			flags|= JavaRefactoringDescriptor.JAR_SOURCE_ATTACHMENT;
	} catch (JavaModelException exception) {
		JavaPlugin.log(exception);
	}
	final String description= members.length == 1 ? Messages.format(RefactoringCoreMessages.MoveStaticMembersProcessor_description_descriptor_short_multi, BasicElementLabels.getJavaElementName(members[0].getElementName())) : RefactoringCoreMessages.MoveMembersRefactoring_move_members;
	final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
	comment.addSetting(Messages.format(RefactoringCoreMessages.MoveStaticMembersProcessor_target_element_pattern, getQualifiedTypeLabel(fDestinationType)));
	final MoveStaticMembersDescriptor descriptor= RefactoringSignatureDescriptorFactory.createMoveStaticMembersDescriptor();
	descriptor.setProject(project);
	descriptor.setDescription(description);
	descriptor.setComment(comment.asString());
	descriptor.setFlags(flags);
	descriptor.setDestinationType(fDestinationType);
	descriptor.setKeepOriginal(fDelegateUpdating);
	descriptor.setDeprecateDelegate(fDelegateDeprecation);
	descriptor.setMembers(members);
	return descriptor;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:33,代码来源:MoveStaticMembersProcessor.java


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