1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-03-07 02:58:00 +00:00
parent a7a8d608fa
commit 8a36c6376d

View file

@ -25,7 +25,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
import org.w3c.dom.Element; import org.w3c.dom.Element;
/** /**
* This class contains methods to get first process block element, next process * This class contains methods to get first process block element, next process
* block element and checks for next process block element. * block element and checks for next process block element.
@ -65,7 +64,7 @@ public class Process {
ProcessParameter[] params = processRunner.getProcessParameters(); ProcessParameter[] params = processRunner.getProcessParameters();
List<ProcessArgument> list = new ArrayList<ProcessArgument>(params.length); List<ProcessArgument> list = new ArrayList<ProcessArgument>(params.length);
int childIndex = 0; int childIndex = 0;
for(int i=0; i<params.length; i++) { for (int i= 0; i < params.length; i++) {
ProcessParameter param = params[i]; ProcessParameter param = params[i];
boolean childrenRemain = childIndex < children.size(); boolean childrenRemain = childIndex < children.size();
Element child = (childrenRemain ? children.get(childIndex) : null); Element child = (childrenRemain ? children.get(childIndex) : null);
@ -88,7 +87,8 @@ public class Process {
* @return boolean, true if the Process is Ready. * @return boolean, true if the Process is Ready.
*/ */
public boolean isReadyToProcess() { public boolean isReadyToProcess() {
if (processRunner == null || !processRunner.areArgumentsMatchingRequiredParameters(args) || !areAllMacrosExpandable()) { if (processRunner == null || !processRunner.areArgumentsMatchingRequiredParameters(args) ||
!areAllMacrosExpandable()) {
return false; return false;
} }
return true; return true;
@ -100,7 +100,7 @@ public class Process {
*/ */
private boolean areAllMacrosExpandable() { private boolean areAllMacrosExpandable() {
if (args != null) { if (args != null) {
for(int i=0; i<args.length; i++) { for (int i= 0; i < args.length; i++) {
ProcessArgument arg = args[i]; ProcessArgument arg = args[i];
if (!arg.areAllMacrosExpandable()) { if (!arg.areAllMacrosExpandable()) {
return false; return false;
@ -116,10 +116,11 @@ public class Process {
private String getFirstNonExpandableMacroMessage(ProcessArgument[] args2) { private String getFirstNonExpandableMacroMessage(ProcessArgument[] args2) {
if (args != null) { if (args != null) {
String macro; String macro;
for(int i=0; i<args.length; i++) { for (int i= 0; i < args.length; i++) {
ProcessArgument arg = args[i]; ProcessArgument arg = args[i];
if ((macro = arg.getFirstNonExpandableMacro()) != null) { if ((macro = arg.getFirstNonExpandableMacro()) != null) {
return TemplateEngineMessages.getString("Process.argument") + arg.getName() + TemplateEngineMessages.getString("Process.expandableMacro") + macro; //$NON-NLS-1$ //$NON-NLS-2$ return TemplateEngineMessages.getString("Process.argument") + arg.getName() + //$NON-NLS-1$
TemplateEngineMessages.getString("Process.expandableMacro") + macro; //$NON-NLS-1$
} }
} }
} }
@ -166,7 +167,7 @@ public class Process {
private void resolve() { private void resolve() {
if (args != null) { if (args != null) {
for(int i=0; i<args.length; i++) { for (int i= 0; i < args.length; i++) {
ProcessArgument arg = args[i]; ProcessArgument arg = args[i];
if (!arg.isResolved()) { if (!arg.isResolved()) {
arg.resolve(); arg.resolve();
@ -181,7 +182,7 @@ public class Process {
public Set<String> getMacros() { public Set<String> getMacros() {
Set<String> set = null; Set<String> set = null;
if (args != null) { if (args != null) {
for(int i=0; i<args.length; i++) { for (int i= 0; i < args.length; i++) {
ProcessArgument arg = args[i]; ProcessArgument arg = args[i];
Set<String> subSet = arg.getMacros(); Set<String> subSet = arg.getMacros();
if (subSet != null) { if (subSet != null) {