本文整理匯總了Java中org.netbeans.modules.refactoring.api.Problem.getNext方法的典型用法代碼示例。如果您正苦於以下問題:Java Problem.getNext方法的具體用法?Java Problem.getNext怎麽用?Java Problem.getNext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.netbeans.modules.refactoring.api.Problem
的用法示例。
在下文中一共展示了Problem.getNext方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addToEnd
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
/**
* Sets the given <code>toAdd</code> as the following problem for
* the given <code>existing</code> problem.
*
* @param toAdd the problem to add, may be null.
* @param existing the problem whose following problem should be set, may be null.
*
* @return the existing problem with its following problem
* set to the given problem or null if both of the params
* were null.
*
*/
public static Problem addToEnd(Problem toAdd, Problem existing){
if (existing == null){
return toAdd;
}
if (toAdd == null){
return existing;
}
Problem tail = existing;
while(tail.getNext() != null){
tail = tail.getNext();
}
tail.setNext(toAdd);
return tail;
}
示例2: addProblemsToEnd
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
public static Problem addProblemsToEnd(Problem where, Problem what) {
Problem whereCopy = where;
err.log("Where: " + where);
err.log("What: " + what);
if (what != null) {
if (where == null) {
whereCopy = what;
} else {
while (where.getNext() != null) {
where = where.getNext();
}
err.log("Last where: " + where);
while (what != null) {
Problem elem = what;
err.log("Elem: " + elem);
where.setNext(elem);
where = where.getNext();
what = what.getNext();
}
}
}
err.log("wherecopy return: " + whereCopy);
return whereCopy;
}
示例3: chainProblems
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
public static Problem chainProblems(Problem result, Problem problem) {
if (result == null) {
return problem;
}
if (problem == null) {
return result;
}
Problem value;
if(problem.isFatal()) {
problem.setNext(result);
value = problem;
} else {
Problem next = value = result;
while (next.getNext() != null) {
next = next.getNext();
}
next.setNext(problem);
}
return value;
}
示例4: initButtonSize
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
static void initButtonSize(Problem problem) {
buttonWidth = -1.0;
while (problem != null) {
ProblemDetails pdi = problem.getDetails();
if (pdi != null) {
buttonWidth = Math.max(new JButton(pdi.getDetailsHint()).getMinimumSize().getWidth(), buttonWidth);
}
problem = problem.getNext();
}
}
示例5: perform
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
public boolean perform(AbstractRefactoring absRefactoring, ParameterSetter parameterSetter) {
Problem problem = absRefactoring.preCheck();
boolean fatal = false;
while (problem != null) {
ref(problem.getMessage());
fatal = fatal || problem.isFatal();
problem = problem.getNext();
}
if (fatal) {
return false;
}
parameterSetter.setParameters();
problem = absRefactoring.fastCheckParameters();
while (problem != null) {
ref(problem.getMessage());
fatal = fatal || problem.isFatal();
problem = problem.getNext();
}
if (fatal) {
return false;
}
problem = absRefactoring.checkParameters();
while (problem != null) {
ref(problem.getMessage());
fatal = fatal || problem.isFatal();
problem = problem.getNext();
}
if (fatal) {
return false;
}
RefactoringSession rs = RefactoringSession.create("Session");
try {
absRefactoring.prepare(rs);
Collection<RefactoringElement> elems = rs.getRefactoringElements();
rs.doRefactoring(true);
} catch (Throwable t) {
t.printStackTrace();
}
return true;
}
示例6: problemIsFatal
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
protected static boolean problemIsFatal(List<Problem> problems) {
for (Problem problem : problems) {
Problem next = problem;
do {
if (next.isFatal()) {
return true;
}
next = next.getNext();
} while (next != null);
}
return false;
}
示例7: createProblem
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
public static final Problem createProblem(Problem result, boolean isFatal, String message) {
Problem problem = new Problem(isFatal, message);
if (result == null) {
return problem;
} else if (isFatal) {
problem.setNext(result);
return problem;
} else {
Problem p = result;
while (p.getNext() != null)
p = p.getNext();
p.setNext(problem);
return result;
}
}
示例8: addAllProblems
import org.netbeans.modules.refactoring.api.Problem; //導入方法依賴的package包/類
protected static void addAllProblems(List<Problem> problems, Problem head) {
while (head != null) {
problems.add(head);
head = head.getNext();
}
}