org.eclipse.wst.common.frameworks.internal.WTPPlugin类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.eclipse.wst.common.frameworks.internal.WTPPlugin类的一些代码示例,展示了WTPPlugin类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WTPPlugin类的具体详情如下:
包路径:org.eclipse.wst.common.frameworks.internal.WTPPlugin
类名称:WTPPlugin

WTPPlugin介绍

暂无

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core

  1. /**
  2. * This method is called upon plug-in activation
  3. * @param context
  4. * @throws Exception
  5. */
  6. public void start(BundleContext context) throws Exception {
  7. super.start(context);
  8. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.webservice

  1. /**
  2. * Called once by the platform when this plugin is unloaded.
  3. *
  4. * @throws CoreException
  5. * If this plugin fails to shutdown.
  6. */
  7. public void stop(BundleContext context) throws Exception {
  8. super.stop(context);
  9. }
  10. public String getString(String key, boolean translate) {

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks

  1. public Logger getLogger() {
  2. return getMsgLogger();
  3. }
  4. public static boolean isPlatformCaseSensitive() {

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks

  1. public Logger getMsgLogger() {
  2. if (logger == null) {
  3. logger = Logger.getLogger(getPluginID());
  4. setRenderer(logger);
  5. }
  6. return logger;
  7. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ui

  1. public static String findMatchingProjectName(String projectName) {
  2. if (projectName.trim().length() > 0) {
  3. IWorkspaceRoot root = J2EEPlugin.getWorkspace().getRoot();
  4. IProject[] projects = root.getProjects();
  5. String lowerCaseName = projectName.toLowerCase();
  6. // iterate through all projects a compare lowercase names
  7. if (projectName == null || projectName.length() == 0) {
  8. if (projects.length == 1)
  9. return projects[0].getName();
  10. return null;
  11. }
  12. for (int i = 0; i < projects.length; i++) {
  13. if (projects[i].exists()) {
  14. if (WTPPlugin.isPlatformCaseSensitive()) {
  15. if (projects[i].getName().equals(projectName))
  16. return projects[i].getName();
  17. } else {
  18. if (projects[i].getName().toLowerCase().equals(lowerCaseName))
  19. return projects[i].getName();
  20. }
  21. }
  22. }
  23. }
  24. return projectName;
  25. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

  1. if (getBooleanProperty(CREATE_APPCLIENT)) {
  2. actualProjectName = clientModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
  3. projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  4. list.add(projectName);
  5. errorNoSelection = false;
  6. projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  7. if (!list.contains(projectName)) {
  8. list.add(projectName);
  9. projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  10. if (!list.contains(projectName)) {
  11. list.add(projectName);
  12. projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  13. if (!list.contains(projectName)) {
  14. list.add(projectName);

代码示例来源:origin: org.eclipse/org.eclipse.jst.jee

  1. public void start(BundleContext context) throws Exception {
  2. super.start(context);
  3. plugin = this;
  4. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.jsf.core

  1. /**
  2. * This method is called when the plug-in is stopped
  3. * @param context
  4. * @throws Exception
  5. */
  6. public void stop(BundleContext context) throws Exception {
  7. super.stop(context);
  8. plugin = null;
  9. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks

  1. public static IStatus validateName(String name) {
  2. IStatus status = validateProjectName(name);
  3. if (!status.isOK())
  4. return status;
  5. IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
  6. if (project.exists()) {
  7. return WTPCommonPlugin.createErrorStatus(WTPCommonPlugin.getResourceString(WTPCommonMessages.PROJECT_EXISTS_SAMENAME_ERROR, new Object[]{name}));
  8. }
  9. if (!WTPPlugin.isPlatformCaseSensitive()) {
  10. // now look for a matching case variant in the tree
  11. IResource variant = ((Resource) project).findExistingResourceVariant(project.getFullPath());
  12. if (variant != null) {
  13. return WTPCommonPlugin.createErrorStatus(WTPResourceHandler.getString("42")); //$NON-NLS-1$
  14. }
  15. }
  16. return OK_STATUS;
  17. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.webservice

  1. /**
  2. * Called once by the platform when this plugin is first loaded.
  3. *
  4. * @throws CoreException
  5. * If this plugin fails to start.
  6. */
  7. public void start(BundleContext context) throws Exception {
  8. super.start(context);
  9. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.jee

  1. public void stop(BundleContext context) throws Exception {
  2. plugin = null;
  3. super.stop(context);
  4. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

  1. return WTPCommonPlugin.createWarningStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1, new Object[] { tempProjectName,
  2. tempArchive.getPath() }));
  3. } else if (!WTPPlugin.isPlatformCaseSensitive()) {
  4. if (tempProjectName.toLowerCase().equals(earProjectName.toLowerCase())) {
  5. return WTPCommonPlugin.createWarningStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1a, new Object[] { earProjectName,
  6. return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1, new Object[] { tempProjectName,
  7. tempArchive.getPath() }));
  8. } else if (!WTPPlugin.isPlatformCaseSensitive()) {
  9. if (tempProjectName.toLowerCase().equals(earProjectName.toLowerCase())) {
  10. return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1a, new Object[] { earProjectName,
  11. return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_2, new Object[] { tempProjectName,
  12. tempArchive.getPath(), ((Archive) projects.get(tempProjectName)).getURI() }));
  13. } else if (!WTPPlugin.isPlatformCaseSensitive()) {
  14. String lowerCaseProjectName = tempProjectName.toLowerCase();
  15. String currentKey = null;

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ejb

  1. public void start(BundleContext context) throws Exception {
  2. super.start(context);
  3. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.validation

  1. /**
  2. * @see org.eclipse.core.runtime.Plugin#stop(BundleContext context)
  3. */
  4. public void stop(BundleContext context) throws Exception {
  5. super.stop(context);
  6. ResourcesPlugin.getWorkspace().removeResourceChangeListener( EventManager.getManager() );
  7. EventManager.getManager().shutdown();
  8. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks

  1. private IStatus validateName() {
  2. String name = getStringProperty(PROJECT_NAME);
  3. IStatus status = validateProjectName(name);
  4. if (!status.isOK())
  5. return status;
  6. if (getProject().exists())
  7. return WTPCommonPlugin.createErrorStatus(WTPCommonPlugin.getResourceString(WTPCommonMessages.PROJECT_EXISTS_ERROR, new Object[]{name}));
  8. if (!WTPPlugin.isPlatformCaseSensitive()) {
  9. // now look for a matching case variant in the tree
  10. IResource variant = ((Resource) getProject()).findExistingResourceVariant(getProject().getFullPath());
  11. if (variant != null) {
  12. // TODO Fix this string
  13. return WTPCommonPlugin.createErrorStatus("Resource already exists with a different case."); //$NON-NLS-1$
  14. }
  15. }
  16. return OK_STATUS;
  17. }

代码示例来源:origin: org.eclipse/org.eclipse.wst.validation

  1. /**
  2. * @see Plugin#startup()
  3. */
  4. public void start(BundleContext context) throws Exception {
  5. super.start(context);
  6. ResourcesPlugin.getWorkspace().addResourceChangeListener(EventManager.getManager(), IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD | IResourceChangeEvent.POST_CHANGE);
  7. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

  1. public void stop(BundleContext context) throws Exception {
  2. super.stop(context);
  3. ResourcesPlugin.getWorkspace().removeResourceChangeListener(J2EEComponentClasspathUpdater.getInstance());
  4. try {
  5. org.eclipse.core.runtime.Platform.getJobManager().join( J2EEElementChangedListener.PROJECT_COMPONENT_UPDATE_JOB_FAMILY,
  6. new NullProgressMonitor() );
  7. } catch (OperationCanceledException e) {
  8. Logger.getLogger().logError(e.getMessage());
  9. } catch (InterruptedException e) {
  10. Logger.getLogger().logError(e.getMessage());
  11. }
  12. }

代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee

  1. public void start(BundleContext context) throws Exception {
  2. super.start(context);
  3. J2EEXmlDtDEntityResolver.INSTANCE = new CatalogJ2EEXmlDtDEntityResolver();
  4. DOMUtilities.setDefaultEntityResolver(J2EEXmlDtDEntityResolver.INSTANCE);
  5. //Have to do the next line immediately to fix timing problems with factory registration
  6. ArchiveInit.init(false);
  7. //ModuleMaps are the maps from modules in an ear project to the j2ee projects for the
  8. // modules
  9. org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapInit.init(false);
  10. ensureFactoryRegistration();
  11. ValidatorManager.setResourceUtilClass(ResourceUtil.class);
  12. IAdapterManager manager = Platform.getAdapterManager();
  13. manager.registerAdapters(new EarEditAdapterFactory(), ArtifactEditModel.class);
  14. manager.registerAdapters(new AppClientEditAdapterFactory(), ArtifactEditModel.class);
  15. manager.registerAdapters(new VirtualArchiveComponentAdapterFactory(), VirtualArchiveComponent.class );
  16. final ProjectRefactoringListener listener = new ProjectRefactoringListener();//ProjectDependencyCache.getCache());
  17. // register the project rename/delete refactoring listener
  18. ResourcesPlugin.getWorkspace().addResourceChangeListener(listener,
  19. IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_DELETE);
  20. // register the IElementChangedLister that updates the .component file in
  21. // response to .classpath changes
  22. JavaCore.addElementChangedListener(new J2EEElementChangedListener(), ElementChangedEvent.POST_CHANGE);
  23. ResourcesPlugin.getWorkspace().addResourceChangeListener(J2EEComponentClasspathUpdater.getInstance(), IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
  24. }

相关文章