task.maybeConfigure(); if (task instanceof UnknownElement) { realThing = ((UnknownElement) task).getRealThing();
public void addTask(Task task) { // to work with ant 1.6 spoof("in addTask"); if (task instanceof UnknownElement) { spoof("configuring UnknownElement"); task.maybeConfigure(); task = ((UnknownElement) task).getTask(); } tasks.add(task); }
public void addTask(Task task) { // to work with ant 1.6 spoof("in addTask"); if (task instanceof UnknownElement) { spoof("configuring UnknownElement"); task.maybeConfigure(); task = ((UnknownElement) task).getTask(); } tasks.add(task); }
Throwable reason = null; try { maybeConfigure(); DispatchUtils.execute(this); } catch (BuildException ex) {
task.maybeConfigure(); } else { getWrapper().maybeConfigure(getProject());
private Task unwrap(Task task) { if (task instanceof UnknownElement) { task.maybeConfigure(); task = ((UnknownElement) task).getTask(); } return task != null ? task : new Task() { }; }
private List<?> resolveJavacTasks(List<?> javacNodes) { List<Object> resolvedJavacTasks = new ArrayList<>(javacNodes.size()); Iterator<?> nodes = javacNodes.iterator(); while (nodes.hasNext()) { AntTaskNode taskNode = (AntTaskNode) nodes.next(); Task javacTask = taskNode.getTask(); if (javacTask instanceof UnknownElement) { if (((UnknownElement) javacTask).getRealThing() == null) { javacTask.maybeConfigure(); } resolvedJavacTasks.add(((UnknownElement) javacTask).getRealThing()); } else { resolvedJavacTasks.add(javacTask); } } return resolvedJavacTasks; }
public Object getRealTask() { Task task = getTask(); if (task instanceof UnknownElement) { task.maybeConfigure(); return ((UnknownElement) task).getRealThing(); } return task; }
/** * Deploys all apps in this deployment group, then waits for all the * deployments in the group to succeed. Deployments in a group will run * in parallel. */ public void deployApps() { for (Task deployAppTask : deployAppTasks) { // This is in case of a rare bug that occurs in some JVM implementations if (deployAppTask instanceof UnknownElement) { deployAppTask.maybeConfigure(); deployAppTask = ((UnknownElement) deployAppTask).getTask(); } if (!deployAppTask.getTaskName().equals("deploy-opsworks-app")) { throw new BuildException( "Only <deploy-opsworks-app> elements are supported"); } deployAppTask.execute(); deploymentIds.add(deployAppTask.getDescription()); } try { waitForDeploymentGroupToSucceed(deploymentIds, client); } catch (InterruptedException e) { throw new BuildException(e.getMessage(), e); } }
@Override public boolean configure(boolean validateFully) { if (fConfigured) { return false; } // only configure if the user cares about the problems try { getTask().maybeConfigure(); fConfigured = true; return true; } catch (BuildException be) { handleBuildException(be, AntEditorPreferenceConstants.PROBLEM_TASKS); } catch (AntSecurityException se) { // either a system exit or setting of system property was attempted handleBuildException(new BuildException(AntModelMessages.AntTaskNode_0), AntEditorPreferenceConstants.PROBLEM_SECURITY); } catch (IllegalStateException ise) { // this is thrown when the id to augment does not exist // https://bugs.eclipse.org/bugs/show_bug.cgi?id=396219 handleBuildException(new BuildException(ise), AntEditorPreferenceConstants.PROBLEM_TASKS); } return false; }
task.maybeConfigure(); if (task instanceof UnknownElement) { realThing = ((UnknownElement) task).getRealThing();
task.maybeConfigure(); if (task instanceof UnknownElement) { realThing = ((UnknownElement) task).getRealThing();
/** * {@inheritDoc} * <p/> * Passes the {@code expect} instance to the children tasks that are instanceof * {@link net.sf.expectit.ant.matcher.AbstractTaskElement}. */ @Override public void execute() { for (Task t : tasks) { if (t instanceof UnknownElement) { t.maybeConfigure(); Object proxy = ((UnknownElement) t).getWrapper().getProxy(); if (proxy instanceof AbstractTaskElement) { ((AbstractTaskElement) proxy).setExpect(expect); } } } super.execute(); }
/** * Execute the import. Returns <code>true</code> as the import adds to the Ant model */ @Override public boolean configure(boolean validateFully) { if (fConfigured) { return false; } try { getTask().maybeConfigure(); getTask().execute(); fConfigured = true; return true; } catch (BuildException be) { handleBuildException(be, AntEditorPreferenceConstants.PROBLEM_IMPORTS); } catch (AntSecurityException se) { // either a system exit or setting of system property was attempted handleBuildException(new BuildException(AntModelMessages.AntImportNode_0), AntEditorPreferenceConstants.PROBLEM_SECURITY); } return false; }
((Task) wrapper.getProxy()).maybeConfigure(); final Object proxy = wrapper.getProxy(); if (proxy instanceof SubAntHelper) {
((AntModel) getAntModel()).removeDefinerTasks(getIdentifier(), helper.getAntTypeTable()); Hashtable<String, AntTypeDefinition> old = new Hashtable<>(helper.getAntTypeTable()); getTask().maybeConfigure(); getTask().execute(); Iterator<String> newNames = helper.getAntTypeTable().keySet().iterator();
getTask().maybeConfigure(); getTask().execute(); fConfigured = true;
getTask().maybeConfigure(); fConfigured = true; return true;