private void validateFragmentContributions(IBuildEntry binIncludes) { try { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(PDEProject.getPluginXml(fProject).getContents()); XPath xpath = XPathFactory.newInstance().newXPath(); NodeList list = (NodeList) xpath.evaluate("/plugin/extension[@point='org.eclipse.e4.workbench.model']/fragment/@uri", doc, XPathConstants.NODESET); //$NON-NLS-1$ for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); validateBinIncludes(binIncludes, node.getNodeValue()); } } catch (Exception e) { e.printStackTrace(); } }
private void validateBinIncludes(IBuildEntry binIncludes) { // make sure we have a manifest entry if(fProject.exists(ICoreConstants.MANIFEST_PATH)) { String key = "META-INF/"; //$NON-NLS-1$ validateBinIncludes(binIncludes, key); } // make sure if we're a fragment, we have a fragment.xml entry if(fProject.exists(ICoreConstants.FRAGMENT_PATH)) { String key = "fragment.xml"; //$NON-NLS-1$ validateBinIncludes(binIncludes, key); } // make sure if we're a plugin, we have a plugin.xml entry if(fProject.exists(ICoreConstants.PLUGIN_PATH)) { String key = "plugin.xml"; //$NON-NLS-1$ validateBinIncludes(binIncludes, key); } }
private void validateApplicationContributions(IBuildEntry binIncludes) { try { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(PDEProject.getPluginXml(fProject).getContents()); XPath xpath = XPathFactory.newInstance().newXPath(); // are we an application? Node nodeProduct = (Node) xpath.evaluate("/plugin/extension[@point='org.eclipse.core.runtime.products']/product", doc, XPathConstants.NODE); //$NON-NLS-1$ if (nodeProduct != null) { Node attValue = (Node) xpath.evaluate("property[@name='applicationXMI']/@value", nodeProduct, XPathConstants.NODE); //$NON-NLS-1$ if (attValue != null) { if (attValue.getNodeValue().isEmpty()) { //Error: no URL defined but should already be reported. } else { validateBinIncludes(binIncludes, attValue.getNodeValue()); } } else { if (fProject.exists(new Path("Application.e4xmi"))) { //$NON-NLS-1$ // Default if not specified validateBinIncludes(binIncludes, "Application.e4xmi"); //$NON-NLS-1$ } } } } catch (Exception e) { e.printStackTrace(); } }
private void validateBinIncludes(IBuildEntry binIncludes) { validateBinIncludes(binIncludes, ICoreConstants.MANIFEST_FOLDER_NAME); try { if (OSGinf.members().length > 0) { // only validate if we have something in it validateBinIncludes(binIncludes, ICoreConstants.OSGI_INF_FOLDER_NAME); validateBinIncludes(binIncludes, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR); validateBinIncludes(binIncludes, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR); validateBinIncludes(binIncludes, entry);
validateBinIncludes(binIncludes); validateExecutionEnvironment(javacSource, javacTarget, jreCompilationProfile, javacWarnings, javacErrors, getSourceLibraries(sourceEntries)); validateJavaCompilerSettings(javaProjectWarnings);