@Override public Library importLibrary(Library library) throws IOException { return refHelper.copyLibrary(library); } };
@Override public Library importLibrary(final @NonNull Library library) throws IOException { return ReferenceHelper.copyLibrary(library, librariesLocation); } };
public void actionPerformed(ActionEvent e) { assert library.getManager() == LibraryManager.getDefault() : "Only converting from non-sharable to sharable is supported."; //NOi18N try { refHelper.copyLibrary(library); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }
private static void copyRequiredLibraries(AntProjectHelper h, ReferenceHelper rh) throws IOException { if (!h.isSharableProject()) { return; } if (rh.getProjectLibraryManager().getLibrary("junit") == null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit")); // NOI18N } if (rh.getProjectLibraryManager().getLibrary("junit_4") == null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit_4")); // NOI18N } if (rh.getProjectLibraryManager().getLibrary("CopyLibs") == null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("CopyLibs")); // NOI18N } }
rh.copyLibrary(LibraryManager.getDefault().getLibrary(libName));
private static void copyRequiredLibraries(AntProjectHelper h, ReferenceHelper rh, WebProjectCreateData data) throws IOException { if (!h.isSharableProject()) { return; } if (!data.skipTests() && rh.getProjectLibraryManager().getLibrary("junit") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit")); // NOI18N } } if (!data.skipTests() && rh.getProjectLibraryManager().getLibrary("junit_4") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit_4") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit_4")); // NOI18N } } Profile j2eeProfile = data.getJavaEEProfile(); if (j2eeProfile.equals(Profile.JAVA_EE_6_FULL) || j2eeProfile.equals(Profile.JAVA_EE_6_WEB) || j2eeProfile.equals(Profile.JAVA_EE_7_FULL) || j2eeProfile.equals(Profile.JAVA_EE_7_WEB)) { if (rh.getProjectLibraryManager().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME) == null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME)); // NOI18N } } SharabilityUtility.makeSureProjectHasCopyLibsLibrary(h, rh); }
private static void copyRequiredLibraries(AntProjectHelper h, ReferenceHelper rh, AppClientProjectCreateData createData) throws IOException { if (!h.isSharableProject()) { return; } if (!createData.skipTests() && rh.getProjectLibraryManager().getLibrary("junit") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit")); // NOI18N } } if (!createData.skipTests() && rh.getProjectLibraryManager().getLibrary("junit_4") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit_4") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit_4")); // NOI18N } } Profile j2eeProfile = createData.getJavaEEProfile(); if (j2eeProfile.equals(Profile.JAVA_EE_6_FULL) || j2eeProfile.equals(Profile.JAVA_EE_6_WEB) || j2eeProfile.equals(Profile.JAVA_EE_7_FULL) || j2eeProfile.equals(Profile.JAVA_EE_7_WEB)) { if (rh.getProjectLibraryManager().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME) == null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME)); // NOI18N } } SharabilityUtility.makeSureProjectHasCopyLibsLibrary(h, rh); }
private static void copyRequiredLibraries(AntProjectHelper h, ReferenceHelper rh, EjbJarProjectCreateData data) throws IOException { if (!h.isSharableProject()) { return; } if (!data.skipTests() && rh.getProjectLibraryManager().getLibrary("junit") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit")); // NOI18N } } if (!data.skipTests() && rh.getProjectLibraryManager().getLibrary("junit_4") == null) { // NOI18N if (LibraryManager.getDefault().getLibrary("junit_4") != null) { rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit_4")); // NOI18N } } Profile j2eeProfile = data.getJavaEEProfile(); if (j2eeProfile.equals(Profile.JAVA_EE_6_FULL) || j2eeProfile.equals(Profile.JAVA_EE_6_WEB) || j2eeProfile.equals(Profile.JAVA_EE_7_FULL) || j2eeProfile.equals(Profile.JAVA_EE_7_WEB)) { if (rh.getProjectLibraryManager().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME) == null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary(AntProjectConstants.ENDORSED_LIBRARY_NAME)); // NOI18N } } SharabilityUtility.makeSureProjectHasCopyLibsLibrary(h, rh); }
if (lib == null) { try { refHelper.copyLibrary(LibraryManager.getDefault().getLibrary("CopyLibs")); // NOI18N } catch (IOException ex) { Exceptions.printStackTrace(ex); refHelper.copyLibrary(LibraryManager.getDefault().getLibrary("CopyLibs")); // NOI18N } catch (IOException ex) { Exceptions.printStackTrace(ex);
private static void copyRequiredLibraries(AntProjectHelper h, ReferenceHelper rh) throws IOException { if (!h.isSharableProject()) { return; } if (rh.getProjectLibraryManager().getLibrary("junit") == null // NOI18N && LibraryManager.getDefault().getLibrary("junit") != null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit")); // NOI18N } if (rh.getProjectLibraryManager().getLibrary("junit_4") == null // NOI18N && LibraryManager.getDefault().getLibrary("junit_4") != null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary("junit_4")); // NOI18N } if (rh.getProjectLibraryManager().getLibrary("CopyLibs") == null // NOI18N && LibraryManager.getDefault().getLibrary("CopyLibs") != null) { // NOI18N rh.copyLibrary(LibraryManager.getDefault().getLibrary("CopyLibs")); // NOI18N } if (rh.getProjectLibraryManager().getLibrary("JavaFX2Runtime") == null // NOI18N && LibraryManager.getDefault().getLibrary("JavaFX2Runtime") != null) { // NOI18N File mainPropertiesFile = h.resolveFile(h.getLibrariesLocation()); referenceLibrary(LibraryManager.getDefault().getLibrary("JavaFX2Runtime"), mainPropertiesFile.toURI().toURL(), true); //NOI18N } }