private InlineMethodRefactoring(ITypeRoot typeRoot, ASTNode node, int offset, int length) { Assert.isNotNull(typeRoot); Assert.isTrue(JavaElementUtil.isSourceAvailable(typeRoot)); Assert.isNotNull(node); fInitialTypeRoot= typeRoot; fInitialNode= node; fSelectionStart= offset; fSelectionLength= length; }
private InlineMethodRefactoring(ITypeRoot typeRoot, ASTNode node, int offset, int length) { Assert.isNotNull(typeRoot); Assert.isTrue(JavaElementUtil.isSourceAvailable(typeRoot)); Assert.isNotNull(node); fInitialTypeRoot= typeRoot; fInitialNode= node; fSelectionStart= offset; fSelectionLength= length; }
private InlineMethodRefactoring(ITypeRoot typeRoot, ASTNode node, int offset, int length) { Assert.isNotNull(typeRoot); Assert.isTrue(JavaElementUtil.isSourceAvailable(typeRoot)); Assert.isNotNull(node); fInitialTypeRoot= typeRoot; fInitialNode= node; fSelectionStart= offset; fSelectionLength= length; }
@Override public void run(ITextSelection selection) { ITypeRoot typeRoot= SelectionConverter.getInput(fEditor); if (typeRoot == null) return; if (! JavaElementUtil.isSourceAvailable(typeRoot)) return; run(selection.getOffset(), selection.getLength(), typeRoot); }
public void run(ITextSelection selection) { ITypeRoot typeRoot= SelectionConverter.getInputAsTypeRoot(fEditor); if (typeRoot == null) return; if (! JavaElementUtil.isSourceAvailable(typeRoot)) return; run(selection.getOffset(), selection.getLength(), typeRoot); }
@Override public void run(ITextSelection selection) { ITypeRoot typeRoot= SelectionConverter.getInput(fEditor); if (typeRoot == null) return; if (! JavaElementUtil.isSourceAvailable(typeRoot)) return; run(selection.getOffset(), selection.getLength(), typeRoot); }
if (iMethod != null && JavaElementUtil.isSourceAvailable(iMethod)) { ASTParser parser= ASTParser.newParser(IASTSharedValues.SHARED_AST_LEVEL); parser.setSource(iMethod.getTypeRoot());
if (iMethod != null && JavaElementUtil.isSourceAvailable(iMethod)) { ASTParser parser= ASTParser.newParser(ASTProvider.SHARED_AST_LEVEL); parser.setSource(iMethod.getTypeRoot());
} else { IClassFile classFile= method.getClassFile(); if (! JavaElementUtil.isSourceAvailable(classFile)) { String methodLabel= JavaElementLabels.getTextLabel(method, JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.M_PARAMETER_TYPES); status.addFatalError(Messages.format(RefactoringCoreMessages.InlineMethodRefactoring_error_classFile, methodLabel));
} else { IClassFile classFile= method.getClassFile(); if (! JavaElementUtil.isSourceAvailable(classFile)) { String methodLabel= JavaElementLabels.getTextLabel(method, JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.M_PARAMETER_TYPES); status.addFatalError(Messages.format(RefactoringCoreMessages.InlineMethodRefactoring_error_classFile, methodLabel));
} else { IClassFile classFile= method.getClassFile(); if (! JavaElementUtil.isSourceAvailable(classFile)) { String methodLabel= JavaElementLabels.getTextLabel(method, JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.M_PARAMETER_TYPES); status.addFatalError(Messages.format(RefactoringCoreMessages.InlineMethodRefactoring_error_classFile, methodLabel));