IDE.setDefaultEditor(file, ComponenteditorPlugin.ComponentEditorID);
String editorID = ComponenteditorPlugin.ComponentEditorID; if(extension.equals("java")) { editorID = "org.eclipse.jdt.ui.CompilationUnitEditor"; } IDE.setDefaultEditor(file, editorID);
	public boolean visit(IResourceDelta delta) throws CoreException {		IResource resource = delta.getResource();		if (resource.getType() == IResource.PROJECT) {			IProject project = (IProject)resource;			IProjectAdapter projectAdapter = (IProjectAdapter) project					.getAdapter(IProjectAdapter.class);			return projectAdapter != null;		}		if (resource.getType() == IResource.FOLDER) {			if ("framework".equals(resource.getFileExtension())					|| "woa".equals(resource.getFileExtension())					|| "build".equals(resource.getName())					|| "dist".equals(resource.getName())					|| "target".equals(resource.getName())) {				return false;			}		}		if (resource.getType() == IResource.FILE) {			if(!resource.isAccessible()) {				return false;			}			IFile file = (IFile) resource;			QualifiedName qualifiedName = new QualifiedName("org.objectstyle.wolips.componenteditor.listener",					"touched");			String property = file.getPersistentProperty(qualifiedName);			if (property != null) {				return false;			}			String extension = file.getFileExtension();			ComponentEditorInput input = null;			if (extension == null) {				return false;			}			if (extension.equals("java")) {				try {					input = ComponentEditorInput.createWithDotJava(file);				} catch (CoreException e) {					ComponenteditorPlugin.getDefault().log(e);				}			}			if (extension.equals("html")) {				try {					input = ComponentEditorInput.createWithDotHtml(file);				} catch (CoreException e) {					ComponenteditorPlugin.getDefault().log(e);				}			}			if (extension.equals("wod")) {				try {					input = ComponentEditorInput.createWithDotWod(file);				} catch (CoreException e) {					ComponenteditorPlugin.getDefault().log(e);				}			}			if (extension.equals("api")) {				try {					input = ComponentEditorInput.createWithDotApi(file);				} catch (CoreException e) {					ComponenteditorPlugin.getDefault().log(e);				}			}			if (extension.equals("woo")) {				try {					input = ComponentEditorInput.createWithDotWoo(file);				} catch (CoreException e) {					ComponenteditorPlugin.getDefault().log(e);				}			}			if (input != null) {				IDE.setDefaultEditor(file,						ComponenteditorPlugin.ComponentEditorID);//				file.setPersistentProperty(qualifiedName, "true");				return false;			}		}		return true;	}