public void add(IPluginImport iimport) throws CoreException { if (iimport == null) return; if (imports == null) // if imports == null, intitialize the imports list by calling getImports() getImports(); addImport(iimport); fireStructureChanged(iimport, true); }
public void add(IPluginImport[] iimports) throws CoreException { if (iimports != null && iimports.length > 0) { if (imports == null) // if imports == null, intitialize the imports list by calling getImports() getImports(); for (int i = 0; i < iimports.length; i++) { if (iimports[i] != null) addImport(iimports[i]); } fireStructureChanged(iimports, true); } }
public void remove(IPluginImport pluginImport) throws CoreException { if (imports != null) { imports.remove(pluginImport); Object header = getManifestHeader(Constants.REQUIRE_BUNDLE); if (header instanceof RequireBundleHeader) { ((RequireBundleHeader)header).removeBundle(pluginImport.getId()); } fireStructureChanged(pluginImport, false); } }
public void remove(IPluginImport[] pluginImports) throws CoreException { if (imports != null) { for (int i = 0; i < pluginImports.length; i++) { imports.remove(pluginImports[i]); Object header = getManifestHeader(Constants.REQUIRE_BUNDLE); if (header instanceof RequireBundleHeader) { ((RequireBundleHeader)header).removeBundle(pluginImports[i].getId()); } } fireStructureChanged(pluginImports, false); } }
public void remove(IPluginLibrary library) throws CoreException { if (libraries != null) { libraries.remove(library); Object header = getManifestHeader(Constants.BUNDLE_CLASSPATH); if (header instanceof BundleClasspathHeader) { ((BundleClasspathHeader)header).removeLibrary(library.getName()); } fireStructureChanged(library, false); } }
@Override public void add(IPluginImport iimport) throws CoreException { ensureModelEditable(); if (iimport == null) return; if (imports == null) // if imports == null, intitialize the imports list by calling getImports() getImports(); addImport(iimport); fireStructureChanged(iimport, true); }
@Override public void remove(IPluginImport pluginImport) throws CoreException { ensureModelEditable(); if (imports != null) { imports.remove(pluginImport); Object header = getManifestHeader(Constants.REQUIRE_BUNDLE); if (header instanceof RequireBundleHeader) { ((RequireBundleHeader) header).removeBundle(pluginImport.getId()); } fireStructureChanged(pluginImport, false); } }
public void add(IPluginImport[] iimports) throws CoreException { ensureModelEditable(); if (iimports != null && iimports.length > 0) { if (imports == null) // if imports == null, initialize the imports list by calling getImports() getImports(); for (int i = 0; i < iimports.length; i++) { if (iimports[i] != null) addImport(iimports[i]); } fireStructureChanged(iimports, true); } }
public void remove(IPluginImport[] pluginImports) throws CoreException { ensureModelEditable(); if (imports != null) { for (int i = 0; i < pluginImports.length; i++) { imports.remove(pluginImports[i]); Object header = getManifestHeader(Constants.REQUIRE_BUNDLE); if (header instanceof RequireBundleHeader) { ((RequireBundleHeader) header).removeBundle(pluginImports[i].getId()); } } fireStructureChanged(pluginImports, false); } }
public void add(IPluginLibrary library) throws CoreException { if (libraries == null) // if libraries == null, initialize the libraries varible by calling getLibraries() getLibraries(); libraries.add(library); Object header = getManifestHeader(Constants.BUNDLE_CLASSPATH); if (header instanceof BundleClasspathHeader) { ((BundleClasspathHeader)header).addLibrary(library.getName()); } else { String value = header == null ? null : ((IManifestHeader)header).getValue(); StringBuffer buffer = new StringBuffer(value == null ? "" : value); //$NON-NLS-1$ if (value != null) buffer.append(",\n "); //$NON-NLS-1$ buffer.append(library.getName()); getBundle().setHeader(Constants.BUNDLE_CLASSPATH, buffer.toString()); } fireStructureChanged(library, true); }
@Override public void remove(IPluginLibrary library) throws CoreException { ensureModelEditable(); if (libraries != null) { libraries.remove(library); IManifestHeader header = getManifestHeader(Constants.BUNDLE_CLASSPATH); if (header instanceof BundleClasspathHeader) { ((BundleClasspathHeader) header).removeLibrary(library.getName()); } else if (header != null) { removeLibrary(library, header); } fireStructureChanged(library, false); } }
public void add(IPluginImport iimport, int index) throws CoreException { ensureModelEditable(); int importCount = 0; if (imports != null) { importCount = imports.size(); } // Validate index if (index < 0) { return; } else if (index > importCount) { return; } // 0 <= index <= importCount // Add the element to the list if (imports == null) { // Intitialize the imports list by calling getImports() getImports(); // Add the import to the end of the list addImport(iimport); } else { // Add the import to the list at the specified index addImport(iimport, index); } // Fire event fireStructureChanged(iimport, true); }
@Override public void add(IPluginLibrary library) throws CoreException { ensureModelEditable(); if (libraries == null) // if libraries == null, initialize the libraries varible by calling getLibraries() getLibraries(); libraries.add(library); IManifestHeader header = getManifestHeader(Constants.BUNDLE_CLASSPATH); if (header instanceof BundleClasspathHeader) { ((BundleClasspathHeader) header).addLibrary(library.getName()); } else { addLibrary(library, header); } fireStructureChanged(library, true); }