当前位置: 首页>>代码示例>>Java>>正文


Java SVNUIPlugin.log方法代码示例

本文整理汇总了Java中org.tigris.subversion.subclipse.ui.SVNUIPlugin.log方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUIPlugin.log方法的具体用法?Java SVNUIPlugin.log怎么用?Java SVNUIPlugin.log使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tigris.subversion.subclipse.ui.SVNUIPlugin的用法示例。


在下文中一共展示了SVNUIPlugin.log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isDirty

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
     * tells if given svn resource is dirty or not 
     */
	public static boolean isDirty(final ISVNLocalResource svnResource, LocalResourceStatus status) {
	    try {
			if (!svnResource.exists())
			    return false;
            if (svnResource.getIResource().getType() == IResource.FILE) {
                // for files, we want that only modified files to be considered as dirty
//            	LocalResourceStatus status = svnResource.getStatusFromCache();
                return ((status.isTextModified() || status.isPropModified() || status.isReplaced() || status.isAdded())
							&& !status.isIgnored() && !svnResource.isIgnored());
            } else {
                // a container with an added file, deleted file, conflicted file ... is considered as dirty
                return svnResource.isDirty();
            }
		} catch (SVNException e) {
			//if we get an error report it to the log but assume dirty
			if (!e.operationInterrupted()) {
				SVNUIPlugin.log(e.getStatus());
			}
			return true;
		}
	}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:25,代码来源:SVNLightweightDecorator.java

示例2: getSelectedResources

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Returns the selected resources.
 * 
 * @return the selected resources
 */
protected IResource[] getSelectedResources() {
	ArrayList resourceArray = new ArrayList();
	IResource[] resources = (IResource[])getSelectedResources(IResource.class);
	for (int i = 0; i < resources.length; i++) resourceArray.add(resources[i]);
	ResourceMapping[] resourceMappings = (ResourceMapping[])getSelectedAdaptables(selection, ResourceMapping.class);
	for (int i = 0; i < resourceMappings.length; i++) {
		ResourceMapping resourceMapping = (ResourceMapping)resourceMappings[i];
		try {
			ResourceTraversal[] traversals = resourceMapping.getTraversals(null, null);
			for (int j = 0; j < traversals.length; j++) {
				IResource[] traversalResources = traversals[j].getResources();
				for (int k = 0; k < traversalResources.length; k++) {
					if (!resourceArray.contains(traversalResources[k]))
						resourceArray.add(traversalResources[k]);
				}
			}
		} catch (CoreException e) {
			SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
		}
	}		
	IResource[] selectedResources = new IResource[resourceArray.size()];
	resourceArray.toArray(selectedResources);
	return selectedResources;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:30,代码来源:TeamAction.java

示例3: run

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public void run() {
  final ISVNRemoteResource remoteResource = historyTableProvider.getRemoteResource();
  if(fetchNextLogEntriesJob == null) {
    fetchNextLogEntriesJob = new FetchNextLogEntriesJob();
  }
  if(fetchNextLogEntriesJob.getState() != Job.NONE) {
    fetchNextLogEntriesJob.cancel();
    try {
      fetchNextLogEntriesJob.join();
    } catch(InterruptedException e) {
      SVNUIPlugin.log(new SVNException(Policy
          .bind("HistoryView.errorFetchingEntries", remoteResource.getName()), e)); //$NON-NLS-1$
    }
  }
  fetchNextLogEntriesJob.setRemoteFile(remoteResource);
  Utils.schedule(fetchNextLogEntriesJob, getSite());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:18,代码来源:SVNHistoryPage.java

示例4: scheduleFetchChangePathJob

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public void scheduleFetchChangePathJob(ILogEntry logEntry) {
  if(fetchChangePathJob == null) {
    fetchChangePathJob = new FetchChangePathJob();
  }
  if(fetchChangePathJob.getState() != Job.NONE) {
    fetchChangePathJob.cancel();
    try {
      fetchChangePathJob.join();
    } catch(InterruptedException e) {
  	SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);  
      // SVNUIPlugin.log(new
      // SVNException(Policy.bind("HistoryView.errorFetchingEntries",
      // remoteResource.getName()), e)); //$NON-NLS-1$
    }
  }
  fetchChangePathJob.setLogEntry(logEntry);
  Utils.schedule(fetchChangePathJob, getSite());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:SVNHistoryPage.java

示例5: getResolutions

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public IMarkerResolution[] getResolutions(IMarker marker) {
	List conflictResolutions = new ArrayList();
	try {
 	if (marker.getAttribute("textConflict") != null && marker.getAttribute("textConflict").toString().equals("true")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		conflictResolutions.add(new EditConflictsResolution());
 		conflictResolutions.add(new AcceptMineResolution());
 		conflictResolutions.add(new AcceptTheirsResolution());
 	}
	} catch (Exception e) {
		 SVNUIPlugin.log(e.getMessage());
	}
	conflictResolutions.add(new MarkAsResolvedResolution());
	IMarkerResolution[] resolutionArray = new IMarkerResolution[conflictResolutions.size()];
	conflictResolutions.toArray(resolutionArray);
    return resolutionArray;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:17,代码来源:ConflictResolutionGenerator.java

示例6: ResolveTreeConflictWizard

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public ResolveTreeConflictWizard(SVNTreeConflict treeConflict, IWorkbenchPart targetPart) {
	super();
	this.treeConflict = treeConflict;
	this.targetPart = targetPart;
	svnResource =  SVNWorkspaceRoot.getSVNResourceFor(treeConflict.getResource());
	try {
		added = svnResource.isAdded();
	} catch (SVNException e) {
		SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:12,代码来源:ResolveTreeConflictWizard.java

示例7: setSubscriber

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
protected void setSubscriber(Subscriber subscriber) {
	super.setSubscriber(subscriber);
	try {
		ISynchronizeParticipantDescriptor descriptor = getDescriptor();
		setInitializationData(descriptor);
	} catch (CoreException e) {
		SVNUIPlugin.log(e);
	}
	if (getSecondaryId() == null) {
		setSecondaryId(Long.toString(System.currentTimeMillis()));
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:13,代码来源:ScopableSubscriberParticipant.java

示例8: setActionEnablement

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Method invoked from <code>selectionChanged(IAction, ISelection)</code> 
 * to set the enablement status of the action. The instance variable 
 * <code>selection</code> will contain the latest selection so the methods
 * <code>getSelectedResources()</code> and <code>getSelectedProjects()</code>
 * will provide the proper objects.
 * 
 * This method can be overridden by subclasses but should not be invoked by them.
 */
protected void setActionEnablement(IAction action) {
	try {
		action.setEnabled(isEnabled());
	} catch (TeamException e) {
		if (e.getStatus().getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
			// Enable the action to allow the user to discover the problem
			action.setEnabled(true);
		} else {
			action.setEnabled(false);
			// We should not open a dialog when determining menu enablements so log it instead
			SVNUIPlugin.log(e);
		}
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:24,代码来源:TeamAction.java

示例9: fetchComment

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
   * Fetch the comment of the given SyncInfo
   * @param info info to get comment for
   * @return the comment
   */
  private String fetchComment(SVNStatusSyncInfo info) {
String fetchedComment = Policy.bind("SynchronizeView.standardIncomingChangeSetComment"); // $NON-NLS-1$
  	IResourceVariant remoteResource = info.getRemote();
  	if (remoteResource instanceof ISVNRemoteResource) {
  		ISVNRemoteResource svnRemoteResource = (ISVNRemoteResource)remoteResource;
  		ISVNClientAdapter client = null;
  		try {
		client = svnRemoteResource.getRepository().getSVNClient();
   		SVNUrl url = svnRemoteResource.getRepository().getRepositoryRoot();
   		SVNRevision rev = svnRemoteResource.getLastChangedRevision();
   		ISVNLogMessage[] logMessages = client.getLogMessages(url, rev, rev, false);
		if (logMessages.length != 0) {
			String logComment = logMessages[0].getMessage();
			if (logComment.trim().length() != 0) {
				fetchedComment = flattenComment(logComment); 
			} else {
				fetchedComment = "";
			}
		}
	} catch (SVNException e1) {
		if (!e1.operationInterrupted()) {
			SVNUIPlugin.log(e1);
		}
	} catch (SVNClientException e) {
		SVNUIPlugin.log(SVNException.wrapException(e));
	}
  		finally {
  			svnRemoteResource.getRepository().returnSVNClient(client);
  		}
 		}
  	return fetchedComment;
  }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:38,代码来源:SVNChangeSetCollector.java

示例10: getSubscriberOperation

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
	changeSets = new ArrayList();
	// override the elemenents (this has to be done this way because of final methods in eclipse api)
	elements = getFilteredDiffElementsOverride();
	String url = null;
	ChangeSet changeSet = null;
    IStructuredSelection selection = getStructuredSelection();
	Iterator iter = selection.iterator();
	String proposedComment = "";
	while (iter.hasNext()) {
		ISynchronizeModelElement synchronizeModelElement = (ISynchronizeModelElement)iter.next();
		proposedComment = getProposedComment(proposedComment, synchronizeModelElement);
		if (!(synchronizeModelElement instanceof ChangeSetDiffNode)) {
			if (url == null && selection.size() == 1) {
			    IResource resource = synchronizeModelElement.getResource();
			    if (resource != null) {
				    ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resource);
		            try {
		                url = svnResource.getStatus().getUrlString();
		                if ((url == null) || (resource.getType() == IResource.FILE)) url = Util.getParentUrl(svnResource);
		            } catch (SVNException e) {
		            	if (!e.operationInterrupted()) {
		            		SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
		            	}
		            }	    
			    }
			}
		} else {
			if (selection.size() == 1) {
				ChangeSetDiffNode changeSetDiffNode = (ChangeSetDiffNode)synchronizeModelElement;
				changeSet = changeSetDiffNode.getSet();
			}
		}
	}
	CommitSynchronizeOperation operation = new CommitSynchronizeOperation(configuration, elements, url, proposedComment);
    operation.setChangeSet(changeSet);
	return operation;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:39,代码来源:CommitSynchronizeAction.java

示例11: confirmOverwrite

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
/**
 * Ask the user to confirm the overwrite of the file if the file has been
 * modified since last commit
 */
private boolean confirmOverwrite() {
   IFile file = (IFile) resource;
   if(file != null && file.exists()) {
     ISVNLocalFile svnFile = SVNWorkspaceRoot.getSVNFileFor(file);
     try {
       if(svnFile.isDirty()) {
         String title = Policy.bind("HistoryView.overwriteTitle"); //$NON-NLS-1$
         String msg = Policy.bind("HistoryView.overwriteMsg"); //$NON-NLS-1$
         final MessageDialog dialog = new MessageDialog(getSite().getShell(), title, null, msg,
             MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
         final int[] result = new int[ 1];
         getSite().getShell().getDisplay().syncExec(new Runnable() {
           public void run() {
             result[ 0] = dialog.open();
           }
         });
         if(result[ 0] != 0) {
           // cancel
           return false;
         }
       }
     } catch(SVNException e) {
       SVNUIPlugin.log(e.getStatus());
     }
   }
   return true;
 }
 
开发者ID:subclipse,项目名称:subclipse,代码行数:32,代码来源:SVNHistoryPage.java

示例12: getContents

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public InputStream getContents() throws CoreException {
	try {
		// Contents are a ByteArrayInputStream which can be reset to the beginning
		contents.reset();
	} catch (IOException e) {
		SVNUIPlugin.log(SVNException.wrapException(e));
	}
	return contents;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:10,代码来源:RemoteAnnotationStorage.java

示例13: hasCommitTemplate

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public boolean hasCommitTemplate() {
    try {
        String commitTemplate = getCommitTemplate();
        return commitTemplate != null && commitTemplate.length() > 0;
    } catch (SVNException e) {
        SVNUIPlugin.log(e);
        return false;
    }
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:10,代码来源:CommitCommentArea.java

示例14: getInitialComment

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
private String getInitialComment() {
    if (fProposedComment != null)
        return fProposedComment;
    try {
        return getCommitTemplate();
    } catch (SVNException e) {
        SVNUIPlugin.log(e);
        return ""; //$NON-NLS-1$
    }
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:11,代码来源:CommitCommentArea.java

示例15: getChildren

import org.tigris.subversion.subclipse.ui.SVNUIPlugin; //导入方法依赖的package包/类
public Object[] getChildren() {
    if (fChildren == null) {
        fChildren= new ArrayList();
      if (remoteResource instanceof ResourceEditionNode) {
         try {
         	if (!getLocalResource().isDirty() && getLocalResource().getResource().getProjectRelativePath().toString().equals(remoteResource.getRemoteResource().getProjectRelativePath()) &&
         			getLocalResource().getStatus().getLastChangedRevision().equals(remoteResource.getRemoteResource().getLastChangedRevision())) {
         		return fChildren.toArray();
         	}
         }
         catch(CoreException e) {
	SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
     }

        if (svnResource instanceof ISVNLocalFolder) {
            try {
                ISVNLocalResource[] members = (ISVNLocalResource[])((ISVNLocalFolder)svnResource).members(null, ISVNFolder.ALL_EXISTING_UNIGNORED_MEMBERS);
                for (int i= 0; i < members.length; i++) {
                    IStructureComparator child= createChild(members[i]);
                    if (child != null)
                        fChildren.add(child);
                }
            } catch (CoreException ex) {
                // NeedWork
            }
        }
    }
    return fChildren.toArray();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:31,代码来源:SVNLocalResourceNode.java


注:本文中的org.tigris.subversion.subclipse.ui.SVNUIPlugin.log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。