public RepositoryInfo(String id, String type, String name, String repositoryPath, String repositoryUrl, String indexUpdateUrl) { this.id = id; this.type = type; this.name = name; this.repositoryPath = repositoryPath; this.repositoryUrl = repositoryUrl; this.indexUpdateUrl = indexUpdateUrl; assert (isLocal() == true && isRemoteDownloadable() == true) != true : "XXXCannot have both local and remote index fields filled in."; //NOI18N }
@Override public Image getIcon(int arg0) { if (info.isRemoteDownloadable()) { return Utilities.loadImage("org/codehaus/mevenide/repository/remoterepo.png", true); //NOI18N } return Utilities.loadImage("org/codehaus/mevenide/repository/localrepo.png", true); //NOI18N }
if (info != null && (info.isLocal() || info.isRemoteDownloadable())) { btnOK.setEnabled(false); lblValidate.setText(NbBundle.getMessage(RepositoryRegisterUI.class, "LBL_Repo_id_Error2"));
public void modify(RepositoryInfo info) { modify = true; txtRepoId.setEditable(false); txtRepoId.setText(info.getId()); txtRepoName.setText(info.getName()); comType.setSelectedItem(info.getType()); if (info.isLocal()) { jraLocal.setSelected(true); txtRepoPath.setText(info.getRepositoryPath()); jraLocalActionPerformed(null); } else if (info.isRemoteDownloadable()) { jraRemote.setSelected(true); txtRepoUrl.setText(info.getRepositoryUrl()); txtIndexUrl.setText(info.getIndexUpdateUrl()); jraRemoteActionPerformed(null); } }
private void loadIndexingContext(final RepositoryInfo... repoids) throws IOException, UnsupportedExistingLuceneIndexException { assert MUTEX.isWriteAccess(); for (RepositoryInfo info : repoids) { LOGGER.finer("Loading Context :" + info.getId());//NOI18N if (info.isLocal() || info.isRemoteDownloadable()) { indexer.addIndexingContext( // info.getId(), // context id info.getId(), // repository id info.isLocal() ? new File(info.getRepositoryPath()) : null, // repository folder new File(getDefaultIndexLocation(), info.getId()), // index folder info.isRemoteDownloadable() ? info.getRepositoryUrl() : null, // repositoryUrl info.isRemoteDownloadable() ? info.getIndexUpdateUrl() : null, // index update url NB_INDEX); } } }
List<RepositoryInfo> slowCheck = new ArrayList<RepositoryInfo>(); for (RepositoryInfo repo : repos) { if (repo.isLocal() || repo.isRemoteDownloadable()) { boolean unload = true; try {
return null; if (repo.isRemoteDownloadable()) { LOGGER.finer("Indexing Remote Repository :"+repo.getId());//NOI18N RemoteIndexTransferListener listener = new RemoteIndexTransferListener(repo);
private Node createRootNode() { Children.Array array = new Children.Array(); List<RepositoryInfo> infos = RepositoryPreferences.getInstance().getRepositoryInfos(); for (RepositoryInfo ri : infos) { if (ri.isRemoteDownloadable() || ri.isLocal()) { array.add(new Node[]{new RepositoryNode(ri)}); } } return new AbstractNode(array); }
for (final RepositoryInfo ri : ris) { if (!ri.isRemoteDownloadable() && !ri.isLocal()) { continue;
@Override public Action[] getActions(boolean context) { Artifact artifact = RepositoryUtil.createArtifact(record); Action[] retValue; if(info.isRemoteDownloadable()){ retValue = new Action[]{ new AddAsDependencyAction(artifact), CommonArtifactActions.createFindUsages(artifact), null, CommonArtifactActions.createViewProjectHomeAction(artifact), CommonArtifactActions.createViewBugTrackerAction(artifact), CommonArtifactActions.createSCMActions(artifact) }; }else{ retValue = new Action[]{ new AddAsDependencyAction(artifact), null, CommonArtifactActions.createFindUsages(artifact), null, CommonArtifactActions.createViewJavadocAction(artifact), CommonArtifactActions.createViewProjectHomeAction(artifact), CommonArtifactActions.createViewBugTrackerAction(artifact), CommonArtifactActions.createSCMActions(artifact) }; } return retValue; }
@Override public Action[] getActions(boolean context) { Artifact artifact = RepositoryUtil.createArtifact(nbvi); Action[] retValue; RepositoryInfo info = RepositoryPreferences.getInstance().getRepositoryInfoById(nbvi.getRepoId()); if (info != null && info.isRemoteDownloadable()) { retValue = new Action[]{ new AddAsDependencyAction(artifact), CommonArtifactActions.createFindUsages(artifact), null, CommonArtifactActions.createViewProjectHomeAction(artifact), CommonArtifactActions.createViewBugTrackerAction(artifact), CommonArtifactActions.createSCMActions(artifact) }; } else { retValue = new Action[]{ new AddAsDependencyAction(artifact), null, CommonArtifactActions.createFindUsages(artifact), null, CommonArtifactActions.createViewJavadocAction(artifact), CommonArtifactActions.createViewProjectHomeAction(artifact), CommonArtifactActions.createViewBugTrackerAction(artifact), CommonArtifactActions.createSCMActions(artifact) }; } return retValue; }