} | } | ||||
if (numConfigFiles != args.length) { | if (numConfigFiles != args.length) { | ||||
try { | try { | ||||
Class ajc = Class.forName("org.aspectj.tools.ajc.Main"); | |||||
Class<?> ajc = Class.forName("org.aspectj.tools.ajc.Main"); | |||||
Method main = ajc.getMethod("main", new Class[] { String[].class }); | Method main = ajc.getMethod("main", new Class[] { String[].class }); | ||||
main.invoke(null, new Object[] { args }); | main.invoke(null, new Object[] { args }); | ||||
return true; | return true; |
if (userPath != null && userPath.trim().length() != 0) { | if (userPath != null && userPath.trim().length() != 0) { | ||||
classpath.append(userPath); | classpath.append(userPath); | ||||
} | } | ||||
List outputDirs = getOutputLocationManager().getAllOutputLocations(); | |||||
for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) { | |||||
List<File> outputDirs = getOutputLocationManager().getAllOutputLocations(); | |||||
for (Iterator<File> iterator = outputDirs.iterator(); iterator.hasNext();) { | |||||
File dir = (File) iterator.next(); | File dir = (File) iterator.next(); | ||||
classpath.append(File.pathSeparator + dir.getAbsolutePath() + File.pathSeparator); | classpath.append(File.pathSeparator + dir.getAbsolutePath() + File.pathSeparator); | ||||
} | } | ||||
return locationManager; | return locationManager; | ||||
} | } | ||||
public List getProjectSourceFiles() { | |||||
public List<String> getProjectSourceFiles() { | |||||
// unimplemented in AjBrowser (uses BuildConfigManager instead) | // unimplemented in AjBrowser (uses BuildConfigManager instead) | ||||
return null; | return null; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public Set getInpath() { | |||||
public Set<File> getInpath() { | |||||
// unimplemented in AjBrowser | // unimplemented in AjBrowser | ||||
return null; | return null; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public List getProjectXmlConfigFiles() { | |||||
return Collections.EMPTY_LIST; | |||||
public List<String> getProjectXmlConfigFiles() { | |||||
return Collections.emptyList(); | |||||
} | } | ||||
public String getProjectEncoding() { | public String getProjectEncoding() { |
return outputPath; | return outputPath; | ||||
} | } | ||||
public List getAllOutputLocations() { | |||||
List outputDirs = new ArrayList(); | |||||
public List<File> getAllOutputLocations() { | |||||
List<File> outputDirs = new ArrayList<File>(); | |||||
outputDirs.add(new File(getCommonOutputDir())); | outputDirs.add(new File(getCommonOutputDir())); | ||||
return outputDirs; | return outputDirs; | ||||
} | } | ||||
} | } | ||||
public int discoverChangesSince(File dir, long buildtime) { | public int discoverChangesSince(File dir, long buildtime) { | ||||
// TODO Auto-generated method stub | |||||
return 0; | return 0; | ||||
} | } | ||||
public Map getInpathMap() { | |||||
return Collections.EMPTY_MAP; | |||||
public Map<File, String> getInpathMap() { | |||||
return Collections.emptyMap(); | |||||
} | } | ||||
} | } |
import java.awt.event.KeyEvent; | import java.awt.event.KeyEvent; | ||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Iterator; | |||||
import java.util.Vector; | import java.util.Vector; | ||||
import javax.swing.Box; | import javax.swing.Box; | ||||
} | } | ||||
public void notifyCurrentFileChanged(String filePath) { | public void notifyCurrentFileChanged(String filePath) { | ||||
for (Iterator it = editorListeners.iterator(); it.hasNext();) { | |||||
((EditorListener) it.next()).currentFileChanged(filePath); | |||||
for (EditorListener editorListener : editorListeners) { | |||||
editorListener.currentFileChanged(filePath); | |||||
} | } | ||||
} | } | ||||
public void saveContents() { | public void saveContents() { | ||||
try { | try { | ||||
for (Iterator it = editors.iterator(); it.hasNext();) { | |||||
((EditorAdapter) it.next()).saveContents(); | |||||
for (EditorAdapter editorAdapter : editors) { | |||||
editorAdapter.saveContents(); | |||||
} | } | ||||
} catch (IOException ioe) { | } catch (IOException ioe) { | ||||
BrowserErrorHandler.handleError("Editor could not save the current file.", ioe); | BrowserErrorHandler.handleError("Editor could not save the current file.", ioe); |