try  { Enumeration annotationProps = m_projectClassLoader.getResources("annotation.properties"); List annotationPropsFilesList = new ArrayList(); while (annotationProps.hasMoreElements()) { String annFile = ((URL)annotationProps.nextElement()).getFile().toString(); annotationPropsFilesList.add(annFile); BpLog.logInfo("using custom annotations " + annFile); } m_annotationPropsFiles = (String[])annotationPropsFilesList.toArray(new String[]{}); } catch (Throwable t) { BpLog.logError("cannot access annotation.properties file(s)", t); m_annotationPropsFiles = new String[0]; }
m_annotationPropsFiles = new String[0]; IScopeContext projectScope = new ProjectScope(BpAnnotationBuilder.this.getProject()); IEclipsePreferences node = projectScope.getNode(BpCorePlugin.pluginID()); if(node != null) { String value = node.get(BpCorePlugin.annotationFileID, ""); if(value != "") { m_annotationPropsFiles = new String[1]; m_annotationPropsFiles[0] = value; BpLog.logInfo("using custom annotations " + value + " for project " + BpAnnotationBuilder.this.getProject().getName()); } }
        public BpAnnotationBuilderVisitor(IProgressMonitor monitor, boolean isFull) {            m_monitor = monitor;            m_isFull = isFull;                        // get the project classloader            m_jproject = JavaCore.create(getProject());            m_projectClassLoader = BpCorePlugin.getDefault().getProjectClassLoader(m_jproject);            m_eventHandler = new AnnotationEventHandler(m_jproject);                        // get the annotation.properties files            try  {	            Enumeration annotationProps = m_projectClassLoader.getResources("annotation.properties");	            List annotationPropsFilesList = new ArrayList();	            while (annotationProps.hasMoreElements()) {	                String annFile = ((URL)annotationProps.nextElement()).getFile().toString();	                annotationPropsFilesList.add(annFile);	                BpLog.logInfo("using custom annotations " + annFile);	            }	            m_annotationPropsFiles = (String[])annotationPropsFilesList.toArray(new String[]{});            } catch (Throwable t) {                BpLog.logError("cannot access annotation.properties file(s)", t);                m_annotationPropsFiles = new String[0];            }                        // build the classpath we will use to run AnnotationC so that it find             // custom annotations etc            List pathURLs = BpCorePlugin.getDefault().getProjectClassPathURLs(m_jproject);            m_pathFiles = new String[pathURLs.size()];            int i = 0;            for (Iterator urls = pathURLs.iterator(); urls.hasNext(); i++) {                m_pathFiles[i] = ((URL) urls.next()).getFile().toString();            }        }