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


Java QualifiedName类代码示例

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


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

示例1: configure

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
/**
 * Configures a {@link Job} instance using the configuration data held in
 * this {@link JobOptions}.
 *
 * @param job
 *        a {@link Job} to configure (must not be <code>null</code>)
 */
public void configure(final Job job) {
    Check.notNull(job, "job"); //$NON-NLS-1$

    job.setPriority(priority);
    job.setSystem(system);
    job.setUser(user);
    job.setRule(schedulingRule);

    for (final Iterator it = properties.keySet().iterator(); it.hasNext();) {
        final QualifiedName key = (QualifiedName) it.next();
        final Object value = properties.get(key);

        job.setProperty(key, value);
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:23,代码来源:JobOptions.java

示例2: restoreOldSettings

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
private void restoreOldSettings() {
	if (isPropertyPage()) {
		QualifiedName oldKey = new QualifiedName(preferencesId(), useProjectSettingsPreferenceName());
		try {
			String oldValue = project.getPersistentProperty(oldKey);
			if (oldValue != null) {
				// remove old entry
				project.setPersistentProperty(oldKey, null);
				// if were true - save copy into project settings
				if (Boolean.valueOf(oldValue)) {
					saveUseProjectSettings(true);
				}
			}
		} catch (Exception e) {
		}
	}

}
 
开发者ID:UrsZeidler,项目名称:uml2solidity,代码行数:19,代码来源:AbstractProjectPreferencesPage.java

示例3: getString

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public String getString(String name)
{
    String value = null;
    try
    {
        value = resource.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, name));
        if (value == null) 
        {
            value = "";
        }
    } catch (CoreException e)
    {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return value;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:18,代码来源:ResourceBasedPreferenceStore.java

示例4: addSecondSection

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
private void addSecondSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(OWNER_TITLE);

	// Owner text field
	ownerText = new Text(composite, SWT.SINGLE | SWT.BORDER);
	GridData gd = new GridData();
	gd.widthHint = convertWidthInCharsToPixels(TEXT_FIELD_WIDTH);
	ownerText.setLayoutData(gd);

	// Populate owner text field
	try {
		String owner =
			((IResource) getElement()).getPersistentProperty(
				new QualifiedName("", OWNER_PROPERTY));
		ownerText.setText((owner != null) ? owner : DEFAULT_OWNER);
	} catch (CoreException e) {
		ownerText.setText(DEFAULT_OWNER);
	}
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:24,代码来源:ModelPropertyPage.java

示例5: performOk

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
@Override
public boolean performOk() {
	boolean retVal = super.performOk();
	if (retVal && isPropertyPage()) {
		try {
			currentProject().setPersistentProperty(new QualifiedName(qualifiedName(), USE_PROJECT_SETTINGS),
					String.valueOf(useProjectSettingsButton.getSelection()));
			((IPersistentPreferenceStore) getPreferenceStore()).save();
		}
		catch (Exception e) {
			log.error("Error", e); //$NON-NLS-1$
			retVal = false;
		}
	}
	return retVal;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:17,代码来源:AbstractPreferencePage.java

示例6: createEDK2ProjectFromExistingModule

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public static void createEDK2ProjectFromExistingModule(Edk2Module module, IProgressMonitor monitor) throws CoreException {
	IProject newProjectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(module.getName());
	IProjectDescription projDesc;
	newProjectHandle.create(monitor);
	newProjectHandle.open(monitor);
	projDesc = ResourcesPlugin.getWorkspace().newProjectDescription(newProjectHandle.getName());
	IPath newProjectPath = newProjectHandle.getLocation();
	projDesc.setLocation(newProjectPath);

	newProjectHandle.setPersistentProperty(new QualifiedName("Uefi_EDK2_Wizards", "EDK2_WORKSPACE"), module.getWorkspacePath());
	newProjectHandle.setPersistentProperty(new QualifiedName("Uefi_EDK2_Wizards", "MODULE_ROOT_PATH"), new Path(module.getElementPath()).removeLastSegments(1).toString());
	monitor.beginTask("Adding C nature to project", 25);
	CCorePlugin.getDefault().createCDTProject(projDesc, newProjectHandle, null);
	ExistingEdk2ModuleProjectCreator.ConfigureProjectNature(newProjectHandle);
	monitor.beginTask("Creating project structure", 45);
	ProjectStructureUpdater.UpdateProjectStructureFromModule(newProjectHandle, module);

	monitor.beginTask("Parsing include paths", 65);
	ProjectStructureUpdater.updateIncludePaths(newProjectHandle, module);

	monitor.beginTask("Saving EDK2 project properties", 95);

	ProjectStructureUpdater.setResourceChangeListeners(newProjectHandle);
}
 
开发者ID:ffmmjj,项目名称:uefi_edk2_wizards_plugin,代码行数:25,代码来源:ExistingEdk2ModuleProjectCreator.java

示例7: setSyncTimestamp

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public static void setSyncTimestamp(IResource paramIResource) {

		if ((paramIResource == null) || (!paramIResource.exists())) {
			return;
		}
		try {
			if (paramIResource.getType() == 1) {
				paramIResource.refreshLocal(1, new NullProgressMonitor());
			}
			if (paramIResource.exists()) {
				long l = paramIResource.getLocalTimeStamp();
				QualifiedName localQualifiedName = getSyncModifiedQualifiedName(paramIResource);
				paramIResource.getProject().setPersistentProperty(localQualifiedName, String.valueOf(l));
			}
		} catch (CoreException localCoreException) {
			localCoreException.printStackTrace();
		}

	}
 
开发者ID:camac,项目名称:Swiper,代码行数:20,代码来源:SwiperUtil.java

示例8: performOk

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
/** 
 * We override the performOk method. In case of property pages we copy the values in the 
 * overlay store into the property values of the selected project.
 * We also save the state of the radio buttons.
 * 
 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
 */
public boolean performOk() {
	boolean result = super.performOk();
	if (result && isPropertyPage()) {
		// Save state of radiobuttons in project properties
		IResource resource = (IResource) getElement();
		try {
			String value =
				(useProjectSettingsButton.getSelection()) ? TRUE : FALSE;
			resource.setPersistentProperty(
				new QualifiedName(pageId, USEPROJECTSETTINGS),
				value);
		} catch (CoreException e) {
		}
	}
	return result;
}
 
开发者ID:camac,项目名称:Swiper,代码行数:24,代码来源:FieldEditorOverlayPage.java

示例9: performOk

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
/** 
 * We override the performOk method. In case of property pages 
 * we save the state of the radio buttons.
 * 
 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
 */
public boolean performOk() {
	boolean result = super.performOk();
	if (result && isPropertyPage()) {
		// Save state of radiobuttons in project properties
		IResource resource = (IResource) getElement();
		try {
			String value =
				(useProjectSettingsButton.getSelection()) ? TRUE : FALSE;
			resource.setPersistentProperty(
				new QualifiedName(pageId, USEPROJECTSETTINGS),
				value);
		} catch (CoreException e) {
		}
	}
	return result;
}
 
开发者ID:camac,项目名称:Swiper,代码行数:23,代码来源:OverlayPage.java

示例10: savePreferences

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public static void savePreferences(IFile ifile, List<MResource> files) throws CoreException {
	Map<QualifiedName, String> pmap = ifile.getPersistentProperties();
	for (QualifiedName key : pmap.keySet()) {
		if (key.equals(JrxmlExporter.KEY_REPORT_ISMAIN))
			continue;
		ifile.setPersistentProperty(key, null);
	}
	for (MResource f : files) {
		PublishOptions popt = f.getPublishOptions();
		String prefix = f.getValue().getName();
		ifile.setPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".overwrite"), Boolean.toString(popt.isOverwrite()));

		ifile.setPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".reference"), popt.getPublishMethod().toString());
		if (popt.getReferencedResource() != null)
			ifile.setPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".refPATH"), popt.getReferencedResource().getUriString());
		else
			ifile.setPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".refPATH"), null);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:PublishUtil.java

示例11: loadPreferences

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public static void loadPreferences(IProgressMonitor monitor, IFile ifile, MResource f) {
	PublishOptions popt = f.getPublishOptions();
	String prefix = f.getValue().getName();
	try {
		String ovw = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".overwrite"));
		if (ovw != null)
			popt.setOverwrite(Boolean.parseBoolean(ovw));
		String ref = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".reference"));
		if (ref != null) {
			popt.setPublishMethod(ResourcePublishMethod.valueOf(ref));
			String path = ifile.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, prefix + ".refPATH"));
			if (path != null) {
				ResourceDescriptor rd = new ResourceDescriptor();
				rd.setParentFolder(RDUtil.getParentFolder(path));
				rd.setUriString(path);
				rd.setWsType(f.getValue().getWsType());
				popt.setReferencedResource(WSClientHelper.getResource(monitor, f, rd, FileUtils.createTempFile("tmp", "")));
			} else
				popt.setPublishMethod(ResourcePublishMethod.LOCAL);
		}
	} catch (Exception e) {
		popt.setPublishMethod(ResourcePublishMethod.LOCAL);
		e.printStackTrace();
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:PublishUtil.java

示例12: loadPreferences

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
public static Properties loadPreferences(IFile f) throws CoreException {
	int PLENGHT = PREFIX.length();
	Properties props = new Properties();
	String p = "";
	Map<QualifiedName, String> map = f.getPersistentProperties();
	for (QualifiedName qn : map.keySet()) {
		String key = qn.getLocalName();
		String value = map.get(qn);
		if (key.startsWith(PREFIX))
			p += key.substring(PLENGHT) + "=" + value + "\n";
		else
			props.put(key, value);
	}
	if (!p.isEmpty())
		props.put(NET_SF_JASPERREPORTS_JRPROPERTIES, p);
	return props;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:FilePrefUtil.java

示例13: addFirstSection

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
private void addFirstSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	//Label for path field
	Label pathLabel = new Label(composite, SWT.NONE);
	pathLabel.setText(PATH_TITLE);

	// Path text field
	pathValueText = new FileChooser(composite, true);
	GridData gd = new GridData();
	gd.widthHint = convertWidthInCharsToPixels(TEXT_FIELD_WIDTH);
	pathValueText.setLayoutData(gd);
	try {
		pathValueText.setText(((IResource) getElement()).getPersistentProperty(new QualifiedName("", "OF_ROOT")).toString());
	} catch (Exception e) {
		pathValueText.setText(Activator.getDefault().getPreferenceStore().getString("OF_ROOT"));
	}
}
 
开发者ID:openframeworks,项目名称:eclipsePlugin,代码行数:19,代码来源:PropertyPage.java

示例14: writeProp

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
private static void writeProp(final IResource resource, final String key, final Option<String> optValue) throws CoreException {
	final IFile propFile = propFile(resource, key);
	final QualifiedName qnKey = new QualifiedName(QUALIFIER, key);
	if (optValue.isSome()) {
		final String value = optValue.some();
		final InputStream in = IOUtils.toInputStream(value);
		if (!propFile.exists()) {
			mkdirs(propFile);
			propFile.create(in, true, null);
		} else
			propFile.setContents(in, true, true, null);
		resource.setPersistentProperty(qnKey, value);
	} else if (propFile.exists()) {
		propFile.delete(true, null);
		resource.setPersistentProperty(qnKey, null);
	}
	resource.touch(null);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:19,代码来源:ProjectProperties.java

示例15: createKarafPlatformResources

import org.eclipse.core.runtime.QualifiedName; //导入依赖的package包/类
private void createKarafPlatformResources(final IProgressMonitor monitor) throws CoreException {
    newKarafProject.getProjectHandle().getFolder(".bin").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/etc").createLink(workingPlatformModel.getParentKarafModel().getConfigurationDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/deploy").createLink(workingPlatformModel.getParentKarafModel().getUserDeployedDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/lib").createLink(workingPlatformModel.getParentKarafModel().getRootDirectory().append("lib"), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/system").createLink(workingPlatformModel.getParentKarafModel().getPluginRootDirectory(), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/runtime").create(true, true, monitor);

    // TODO: Is this the right way to add the current installation?
    final IDynamicVariable eclipseHomeVariable = VariablesPlugin.getDefault().getStringVariableManager().getDynamicVariable("eclipse_home");
    final String eclipseHome = eclipseHomeVariable.getValue("");
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse").create(true, true, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse/dropins").createLink(new Path(eclipseHome).append("dropins"), 0, monitor);
    newKarafProject.getProjectHandle().getFolder(".bin/platform/eclipse/plugins").createLink(new Path(eclipseHome).append("plugins"), 0, monitor);

    newKarafProject.getProjectHandle().setPersistentProperty(
            new QualifiedName(KarafUIPluginActivator.PLUGIN_ID, "karafProject"),
            "true");

    newKarafProject.getProjectHandle().setPersistentProperty(
            new QualifiedName(KarafUIPluginActivator.PLUGIN_ID, "karafModel"),
            karafPlatformModel.getRootDirectory().toString());
}
 
开发者ID:apache,项目名称:karaf-eik,代码行数:25,代码来源:NewKarafProjectOperation.java


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