@Override public void checkConfiguration(Issues issues) { super.checkConfiguration(issues); if (isCheckFileExtension()) { for (String extension : fileExtensions) { char[] charArray = extension.toCharArray(); if (!Character.isJavaIdentifierPart(charArray[0])) { issues.addError( "file extension '" + extension + "' starts with a non identifier letter : '" + charArray[0] + "'", this); } for (int i = 1; i < charArray.length; i++) { char c = charArray[i]; if (!Character.isJavaIdentifierPart(c)) { issues.addError( "file extension '" + extension + "' contains non identifier letter : '" + c + "'", this); } } } } if (getGrammar() == null) { issues.addError("property 'uri' is mandatory for element 'language'.", this); } }
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); if (getOptions().isBacktrackLexer() && getOptions().isIgnoreCase()) { issues.addError("Backtracking lexer and ignorecase cannot be combined for now."); } }
@Override protected void onFinish(WorkflowContext ctx, ProgressMonitor monitor, Issues issues) { if (!found) { issues.addError("No resource found in the slot"); return; } ctx.set(modelSlot, modelElements); }
@Override protected void invokeInternal( final WorkflowContext model, final ProgressMonitor monitor, final Issues issues) { if (directory != null) { final StringTokenizer st = new StringTokenizer(directory, ","); while (st.hasMoreElements()) { final String dir = st.nextToken().trim(); final File f = new File(dir); if (f.exists() && f.isDirectory()) { LOG.info("Cleaning " + f.getAbsolutePath()); try { cleanFolder(f.getAbsolutePath()); } catch (FileNotFoundException e) { issues.addError(e.getMessage()); } } } } }
@Override protected void checkConfigurationInternal(final Issues issues) { if (directory == null) { issues.addWarning("No directories specified!"); } }
@Override public void checkConfiguration(Issues issues) { if (command == null) issues.addError("Command not set"); }