@Override protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) { plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle))); //$NON-NLS-1$ } }
protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) { boolean unpack = CoreUtility.guessUnpack(bundle); plugin.setAttribute("unpack", Boolean.toString(unpack)); //$NON-NLS-1$ }
@Override protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) { plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle))); //$NON-NLS-1$ }
protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) { // always make sure launcher fragments are flat; or else you will have launching problems HostSpecification host = bundle.getHost(); boolean unpack = (host != null && host.getName().equals("org.eclipse.equinox.launcher")) //$NON-NLS-1$ ? true : CoreUtility.guessUnpack(bundle); plugin.setAttribute("unpack", Boolean.toString(unpack)); //$NON-NLS-1$ }
private void validateUnpack(Element parent) { int severity = CompilerFlags.getFlag(fProject, CompilerFlags.F_UNRESOLVED_PLUGINS); if (severity == CompilerFlags.IGNORE) { return; } if( severity == CompilerFlags.ERROR){ // this might not be an error, so max the flag at WARNING level. severity = CompilerFlags.WARNING; } String unpack = parent.getAttribute("unpack"); //$NON-NLS-1$ if ("false".equals(unpack)) //$NON-NLS-1$ return; IPluginModelBase pModel = PluginRegistry.findModel(parent.getAttribute("id")); //$NON-NLS-1$ if (pModel == null) { return; } if(!CoreUtility.guessUnpack(pModel.getBundleDescription())){ String message = NLS .bind( PDECoreMessages.Builders_Feature_missingUnpackFalse, (new String[] { parent.getAttribute("id"), "unpack=\"false\"" })); //$NON-NLS-1$ //$NON-NLS-2$ report(message, getLine(parent), severity, PDEMarkerFactory.CAT_OTHER); } }
if ("true".equals(unpack) && !CoreUtility.guessUnpack(pModel.getBundleDescription())) {//$NON-NLS-1$ String message = NLS.bind(PDECoreMessages.Builders_Feature_missingUnpackFalse, (new String[] {parent.getAttribute("id"), "unpack=\"false\""})); //$NON-NLS-1$ //$NON-NLS-2$ report(message, getLine(parent), severity, PDEMarkerFactory.CAT_OTHER);
@Override protected void configureFeature(IFeature feature, WorkspaceFeatureModel model) throws CoreException { IFeaturePlugin[] added = new IFeaturePlugin[fPlugins.length]; for (int i = 0; i < fPlugins.length; i++) { IPluginBase plugin = fPlugins[i]; FeaturePlugin fplugin = (FeaturePlugin) model.getFactory().createPlugin(); fplugin.loadFrom(plugin); fplugin.setVersion(ICoreConstants.DEFAULT_VERSION); fplugin.setUnpack(CoreUtility.guessUnpack(plugin.getPluginModel().getBundleDescription())); added[i] = fplugin; } feature.addPlugins(added); }
private void doAdd(Object[] candidates) throws CoreException { IFeatureModel model = (IFeatureModel) getPage().getModel(); IFeature feature = model.getFeature(); IFeaturePlugin[] added = new IFeaturePlugin[candidates.length]; for (int i = 0; i < candidates.length; i++) { IPluginModelBase candidate = (IPluginModelBase) candidates[i]; FeaturePlugin fplugin = (FeaturePlugin) model.getFactory().createPlugin(); fplugin.loadFrom(candidate.getPluginBase()); fplugin.setVersion(ICoreConstants.DEFAULT_VERSION); fplugin.setUnpack(CoreUtility.guessUnpack(candidate.getBundleDescription())); added[i] = fplugin; } feature.addPlugins(added); }