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


Java ISVNUIConstants类代码示例

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


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

示例1: promptForQuickDiffAnnotate

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
/**
 * Returns true if the user wishes to always use the live annotate view, false otherwise.
 * @return
 */
private boolean promptForQuickDiffAnnotate(){
	//check whether we should ask the user.
	final IPreferenceStore store = SVNUIPlugin.getPlugin().getPreferenceStore();
	final String option = store.getString(ISVNUIConstants.PREF_USE_QUICKDIFFANNOTATE);
	
	if (option.equals(MessageDialogWithToggle.ALWAYS))
		return true; //use live annotate
	else if (option.equals(MessageDialogWithToggle.NEVER))
		return false; //don't use live annotate
	
	final MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoQuestion(Utils.getShell(null), Policy.bind("AnnotateOperation_QDAnnotateTitle"),
			Policy.bind("AnnotateOperation_QDAnnotateMessage"), Policy.bind("AnnotateOperation_4"), false, store, ISVNUIConstants.PREF_USE_QUICKDIFFANNOTATE);
	
	final int result = dialog.getReturnCode();
	switch (result) {
		//yes
		case IDialogConstants.YES_ID:
		case IDialogConstants.OK_ID :
		    return true;
	}
	return false;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:27,代码来源:ShowAnnotationOperation.java

示例2: performOk

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
/**
 * OK was clicked. Store the SVN preferences.
 * 
 * @return whether it is okay to close the preference page
 */
public boolean performOk() {
    IPreferenceStore store = getPreferenceStore();
    
    store.setValue(ISVNUIConstants.PREF_MERGE_PROVIDER, 
    		mergeImplementationCombo.getText());
    
    store.setValue(ISVNUIConstants.PREF_SUGGEST_MERGE_SOURCES,
    		suggestMergeSourcesButton.getSelection());
    

    store.setValue(ISVNUIConstants.PREF_MERGE_PROGRAM_LOCATION,
            mergeProgramLocationText.getText());

    store.setValue(ISVNUIConstants.PREF_MERGE_PROGRAM_PARAMETERS,
            mergeProgramParametersText.getText());

    store.setValue(ISVNUIConstants.PREF_MERGE_USE_EXTERNAL,
            externalMergeRadioButton.getSelection());
    return true;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:26,代码来源:DiffMergePreferencePage.java

示例3: execute

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
public void execute(IAction action) throws InterruptedException, InvocationTargetException {
       if (action != null && !action.isEnabled()) { 
       	action.setEnabled(true);
       } 
       else {
       	IPreferenceStore store = SVNUIPlugin.getPlugin().getPreferenceStore();
        IResource[] resources = getSelectedResources(); 
        SVNConflictResolver conflictResolver = new SVNConflictResolver(resources[0], store.getInt(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TEXT_FILES), store.getInt(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_BINARY_FILES), store.getInt(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_PROPERTIES), store.getInt(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TREE_CONFLICTS));
       	UpdateOperation updateOperation = new UpdateOperation(getTargetPart(), resources, SVNRevision.HEAD);
    	updateOperation.setDepth(depth);
    	updateOperation.setSetDepth(setDepth);
    	updateOperation.setForce(store.getBoolean(ISVNUIConstants.PREF_UPDATE_TO_HEAD_ALLOW_UNVERSIONED_OBSTRUCTIONS));
    	updateOperation.setIgnoreExternals(store.getBoolean(ISVNUIConstants.PREF_UPDATE_TO_HEAD_IGNORE_EXTERNALS));
    	updateOperation.setCanRunAsJob(canRunAsJob);
    	updateOperation.setConflictResolver(conflictResolver);
       	updateOperation.run();
       } 		
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:UpdateAction.java

示例4: initializeStreams

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
private void initializeStreams() {
	synchronized(document) {
		if (!initialized) {
			commandStream = newOutputStream();
			errorStream = newOutputStream();
			messageStream = newOutputStream();
			// install colors
			commandColor = createColor(SVNUIPlugin.getStandardDisplay(), ISVNUIConstants.PREF_CONSOLE_COMMAND_COLOR);
			commandStream.setColor(commandColor);
			messageColor = createColor(SVNUIPlugin.getStandardDisplay(), ISVNUIConstants.PREF_CONSOLE_MESSAGE_COLOR);
			messageStream.setColor(messageColor);
			errorColor = createColor(SVNUIPlugin.getStandardDisplay(), ISVNUIConstants.PREF_CONSOLE_ERROR_COLOR);
			errorStream.setColor(errorColor);
			// install font
			setFont(JFaceResources.getFontRegistry().get(ISVNUIConstants.PREF_CONSOLE_FONT));
			initialized = true;
		}
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:20,代码来源:SVNOutputConsole.java

示例5: performOk

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
/**
 * OK was clicked. Store the SVN preferences.  
 *
 * @return whether it is okay to close the preference page
 */
public boolean performOk() {
	IPreferenceStore store = getPreferenceStore();

	if (useDefault.getSelection()) {
		store.setValue(ISVNUIConstants.PREF_MENU_ICON_SET, ISVNUIConstants.MENU_ICON_SET_DEFAULT);
	} else if (useTortoiseSVN.getSelection()) {
		store.setValue(ISVNUIConstants.PREF_MENU_ICON_SET, ISVNUIConstants.MENU_ICON_SET_TORTOISESVN);
	} else if (useSubversive.getSelection()) {
		store.setValue(ISVNUIConstants.PREF_MENU_ICON_SET, ISVNUIConstants.MENU_ICON_SET_SUBVERSIVE);
	}
	
	SVNUIPlugin.getPlugin().savePluginPreferences();

	return true;
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:21,代码来源:SVNMenuIconsPreferencesPage.java

示例6: performOk

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
@Override
public boolean performOk() {
	store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_IGNORE_EXTERNALS, ignoreExternalsButton.getSelection());
	store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_ALLOW_UNVERSIONED_OBSTRUCTIONS, forceButton.getSelection());
	
	if (textConflictMarkButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TEXT_FILES, ISVNConflictResolver.Choice.postpone);
	else store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TEXT_FILES, ISVNConflictResolver.Choice.chooseMerged);
	
	if (binaryConflictIncomingButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_BINARY_FILES, ISVNConflictResolver.Choice.chooseTheirsFull);
	else if (binaryConflictUserButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_BINARY_FILES, ISVNConflictResolver.Choice.chooseMineFull);
	else if (binaryConflictMarkButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_BINARY_FILES, ISVNConflictResolver.Choice.postpone);
	else store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_BINARY_FILES, ISVNConflictResolver.Choice.chooseMerged);		
	
	if (propertyConflictMarkButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_PROPERTIES, ISVNConflictResolver.Choice.postpone);
	else store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_PROPERTIES, ISVNConflictResolver.Choice.chooseMerged);
	
	if (treeConflictMarkButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TREE_CONFLICTS, ISVNConflictResolver.Choice.postpone);
	else if (treeConflictResolveButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TREE_CONFLICTS, ISVNConflictResolver.Choice.chooseMerged);
	else if (treeConflictUserButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TREE_CONFLICTS, ISVNConflictResolver.Choice.chooseMine);
	else if (treeConflictPromptButton.getSelection()) store.setValue(ISVNUIConstants.PREF_UPDATE_TO_HEAD_CONFLICT_HANDLING_TREE_CONFLICTS, SVNConflictResolver.PROMPT);
	
	return super.performOk();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:24,代码来源:UpdateToHeadPreferencePage.java

示例7: performOk

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
public boolean performOk() {
	int numTemplates = viewer.getList().getItemCount();
	String[] templates = new String[numTemplates];
	for (int i = 0; i < numTemplates; i++) {
		templates[i] = (String) viewer.getElementAt(i);
	}
	try {
		SVNUIPlugin.getPlugin().getRepositoryManager().getCommentsManager().replaceAndSaveCommentTemplates(templates);
	} catch (TeamException e) {
		SVNUIPlugin.openError(getShell(), null, null, e, SVNUIPlugin.LOG_OTHER_EXCEPTIONS);
	}
	
	SVNUIPlugin.getPlugin().getPreferenceStore().setValue(ISVNUIConstants.PREF_COMMENTS_TO_SAVE, getCommentsToSave());
	
	return super.performOk();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:17,代码来源:CommentTemplatesPreferencePage.java

示例8: startElement

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
/**
 * @see ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
 */
public void startElement(
		String namespaceURI,
		String localName,
		String qName,
		Attributes atts) {
       String elementName = getElementName(namespaceURI, localName, qName); 		
	
	if (elementName.equals(CommentsManager.ELEMENT_COMMIT_COMMENT)) {
		buffer = new StringBuffer();
		return;
	} 
	if (elementName.equals(CommentsManager.ELEMENT_COMMIT_HISTORY)) {
		comments = new Vector(SVNUIPlugin.getPlugin().getPreferenceStore().getInt(ISVNUIConstants.PREF_COMMENTS_TO_SAVE));
		return;
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:20,代码来源:CommentHistoryContentHandler.java

示例9: getCommentWithPrompt

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
public String getCommentWithPrompt(Shell shell) {
    final String comment= getComment(false);
    if (comment.length() == 0) {
        final IPreferenceStore store= SVNUIPlugin.getPlugin().getPreferenceStore();
        final String value= store.getString(ISVNUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
        
        if (MessageDialogWithToggle.NEVER.equals(value))
            return null;
        
        if (MessageDialogWithToggle.PROMPT.equals(value)) {
            
            final String title= Policy.bind("CommitCommentArea_2"); 
            final String message= Policy.bind("CommitCommentArea_3"); 
            final String toggleMessage= Policy.bind("CommitCommentArea_4"); 
            
            final MessageDialogWithToggle dialog= MessageDialogWithToggle.openYesNoQuestion(shell, title, message, toggleMessage, false, store, ISVNUIConstants.PREF_ALLOW_EMPTY_COMMIT_COMMENTS);
            if (dialog.getReturnCode() != IDialogConstants.YES_ID) {
                fTextBox.setFocus();
                return null;
            }
        }
    }
    return getComment(true);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:25,代码来源:CommitCommentArea.java

示例10: addPages

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
/**
 * Creates the wizard pages
 */
public void addPages() {
	// add the main page
       mainPage = new NewRemoteFolderWizardMainPage(
           "newRemoteFolderPage1",  //$NON-NLS-1$ 
           Policy.bind("NewRemoteFolderWizard.heading"), //$NON-NLS-1$
           SVNUIPlugin.getPlugin().getImageDescriptor(ISVNUIConstants.IMG_WIZBAN_NEW_FOLDER));
       mainPage.setParentFolder(selection);  
	addPage(mainPage);
       
       // add commit comment page
       String pageTitle = Policy.bind("CommentCommitWizardPage.pageTitle"); //$NON-NLS-1$
       String pageDescription = Policy.bind("CommentCommitWizardPage.pageDescription"); //$NON-NLS-1$
       ImageDescriptor image = SVNUIPlugin.getPlugin().getImageDescriptor(ISVNUIConstants.IMG_WIZBAN_NEW_FOLDER);
       commitCommentPage = new CommentCommitWizardPage(parentDialog, pageTitle, pageTitle, image, pageDescription);
       addPage(commitCommentPage); 
               
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:21,代码来源:NewRemoteFolderWizard.java

示例11: createControls

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
private void createControls() {	
	Composite cloudForgeComposite = new Composite(this, SWT.NULL);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	cloudForgeComposite.setLayout(layout);
	GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
	cloudForgeComposite.setLayoutData(data);
	
	ImageHyperlink cloudForgeLink = new ImageHyperlink(cloudForgeComposite, SWT.NONE);
	cloudForgeLink.setImage(SVNUIPlugin.getPlugin().getImageDescriptor(ISVNUIConstants.IMG_CLOUDFORGE).createImage());
	cloudForgeLink.addHyperlinkListener(new HyperlinkAdapter() {
		@Override
		public void linkActivated(HyperlinkEvent evt) {
			try {
				PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(SIGNUP_URL));
			} catch (Exception e) {
				MessageDialog.openError(getShell(), "Sign-up for CloudForge", e.getMessage());
			}
		}			
	});
	cloudForgeLink.setToolTipText(SIGNUP_URL);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:23,代码来源:CloudForgeComposite.java

示例12: start

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
public void start(BundleContext context) throws Exception {
	super.start(context);
	
	// Don't let error crash startup.  Just log it.
	try {
	
		// Initialize the merge input providers.
		mergeInputProviders = getMergeInputProviders();
		
		boolean mergeProviderSet = getPreferenceStore().getBoolean(MERGE_PROVIDER_SET);
		if (!mergeProviderSet) {
			getPreferenceStore().setValue(MERGE_PROVIDER_SET, true);
			SVNUIPlugin.getPlugin().getPreferenceStore().setValue(ISVNUIConstants.PREF_MERGE_PROVIDER, MERGE_PROVIDER);
		}
		
		MergeOutput[] mergeOutputs = MergeOutput.getMergeOutputs();
		for (int i = 0; i < mergeOutputs.length; i++) {
			if (!mergeOutputs[i].isNormalEnd()) {
				mergeOutputs[i].setAbnormalEnd(true);
				mergeOutputs[i].getMergeResults();
				mergeOutputs[i].store();
			}
		}
	
	} catch (Exception e) {
		handleError(e);
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:29,代码来源:Activator.java

示例13: getLogEntries

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
private void getLogEntries() {
   entryArray = new ArrayList();
   IRunnableWithProgress runnable = new IRunnableWithProgress() {
		public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            try {
            	monitor.setTaskName(Messages.MergeWizardUnblockRevisionsPage_retrievingRevisionLogInfo);
            	monitor.beginTask(Messages.MergeWizardUnblockRevisionsPage_retrievingRevisionLogInfo, 3);
            	if (SVNUIPlugin.getPlugin().getPreferenceStore().getBoolean(ISVNUIConstants.PREF_SHOW_TAGS_IN_REMOTE))
            		tagManager = new AliasManager(remoteResource.getUrl());
				SVNRevision pegRevision = remoteResource.getRevision();	
				monitor.worked(1);
				for (int i = 0; i < revisionRanges.length; i++) {
					rangeEntries = getLogEntries(pegRevision, revisionRanges[i].getFromRevision(), revisionRanges[i].getToRevision(), true, 0, tagManager, true);					            	
					monitor.worked(1);
					for (int j = 0; j < rangeEntries.length; j++) {
	            			entryArray.add(rangeEntries[j]);
	            	}					
				}
				
				entries = new ILogEntry[entryArray.size()];
				entryArray.toArray(entries);
			} catch (Exception e) {
				setErrorMessage(e.getMessage());
				entries = new ILogEntry[0];
			}
			monitor.worked(1);
			monitor.done();
		}		   
   };
   try {
	   getContainer().run(false, false, runnable);
	} catch (Exception e1) {
		Activator.handleError(e1);
	}
	setErrorMessage(standardPage.getErrorMessage());
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:37,代码来源:MergeWizardUnblockRevisionsPage.java

示例14: getLogEntries

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
private void getLogEntries(final boolean getAll, final boolean getNext) {
	IRunnableWithProgress runnable = new IRunnableWithProgress() {
		public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
           	try {
   				monitor.setTaskName(Messages.MergeWizardRevisionsPage_retrievingRevisionLogInfo);
               	monitor.beginTask(Messages.MergeWizardRevisionsPage_retrievingRevisionLogInfo, 5);				            		
            	if (SVNUIPlugin.getPlugin().getPreferenceStore().getBoolean(ISVNUIConstants.PREF_SHOW_TAGS_IN_REMOTE))
            		tagManager = new AliasManager(remoteResource.getUrl());
				monitor.worked(1);
				noEligibleEntries = false;
				entries = getEligibleLogEntries(monitor);
				monitor.worked(1);
				if (entries == null || entries.length == 0) noEligibleEntries = true;
				monitor.worked(1);
           	} catch (Exception e) {
   				Activator.handleError(e);
				Display.getDefault().asyncExec(new Runnable() {						
					public void run() {
						setErrorMessage(Messages.MergeWizardChangeSetRevisionsPage_errorRetrievingLogEntries);
					}
				});
				entries = new ILogEntry[0];            		
           	}
			monitor.worked(1);
			monitor.done();            	
		}		
	};
	
	   try {
		   getContainer().run(true, false, runnable);
		} catch (Exception e1) {
			Activator.handleError(e1);
		} 
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:35,代码来源:MergeWizardRevisionsPage.java

示例15: run

import org.tigris.subversion.subclipse.ui.ISVNUIConstants; //导入依赖的package包/类
public void run() {
	remoteResource = null;
	logEntry = null;
	includeTags = SVNUIPlugin.getPlugin().getPreferenceStore().getBoolean(ISVNUIConstants.PREF_SHOW_TAGS_IN_REMOTE);
	BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
		public void run() {
			try {
				RevisionGraphEditorInput input = (RevisionGraphEditorInput)editor.getEditorInput();
				ISVNInfo info = input.getInfo();
				ISVNRepositoryLocation repository = SVNProviderPlugin.getPlugin().getRepository(info.getRepository().toString());
				
				remoteResource = new RemoteFile(repository, new SVNUrl(repository.getLocation() + node.getPath()), new SVNRevision.Number(node.getRevision()));
				
				AliasManager tagManager = null;
            	if (includeTags) tagManager = new AliasManager(remoteResource.getUrl());
            	SVNRevision pegRevision = new SVNRevision.Number(node.getRevision());
            	SVNRevision revisionStart = new SVNRevision.Number(node.getRevision());
            	SVNRevision revisionEnd = new SVNRevision.Number(node.getRevision());
				GetLogsCommand logCmd = new GetLogsCommand(remoteResource, pegRevision, revisionStart, revisionEnd, false, 0, tagManager, true);
				logCmd.run(null);
				ILogEntry[] logEntries = logCmd.getLogEntries(); 
				if (logEntries != null && logEntries.length > 0) {
					logEntry = logEntries[0];
				} 
			} catch (Exception e) {
				MessageDialog.openError(Display.getDefault().getActiveShell(), "Revision Info", e.getMessage());
			}
		}
		
	});
	if (logEntry != null) {
		ShowRevisionsDialog dialog = new ShowRevisionsDialog(Display.getDefault().getActiveShell(), logEntry, remoteResource, includeTags, null);
		dialog.setTitle("Revision Info");
		dialog.setSelectFirst(true);
		dialog.open();
	}
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:38,代码来源:RevisionDetailsAction.java


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