/** * @param iimport * @param index */ private void addImport(IPluginImport iimport, int index) { // Get the header IManifestHeader header = getManifestHeader(Constants.REQUIRE_BUNDLE); if ((header instanceof RequireBundleHeader) == false) { addImport(iimport); } else { // Add the import to the local container imports.add(index, iimport); // Add the import to the header ((RequireBundleHeader) header).addBundle(iimport, index); } }
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 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 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(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); }
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); } }