gpt4 book ai didi

org.eclipse.wst.common.frameworks.internal.WTPPlugin.isPlatformCaseSensitive()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 21:55:05 26 4
gpt4 key购买 nike

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

WTPPlugin.isPlatformCaseSensitive介绍

暂无

代码示例

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

public static String findMatchingProjectName(String projectName) {
  if (projectName.trim().length() > 0) {
    IWorkspaceRoot root = J2EEPlugin.getWorkspace().getRoot();
    IProject[] projects = root.getProjects();
    String lowerCaseName = projectName.toLowerCase();
    // iterate through all projects a compare lowercase names
    if (projectName == null || projectName.length() == 0) {
      if (projects.length == 1)
        return projects[0].getName();
      return null;
    }
    for (int i = 0; i < projects.length; i++) {
      if (projects[i].exists()) {
        if (WTPPlugin.isPlatformCaseSensitive()) {
          if (projects[i].getName().equals(projectName))
            return projects[i].getName();
        } else {
          if (projects[i].getName().toLowerCase().equals(lowerCaseName))
            return projects[i].getName();
        }
      }
    }
  }
  return projectName;
}

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

if (getBooleanProperty(CREATE_APPCLIENT)) {
  actualProjectName = clientModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
  projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  list.add(projectName);
  errorNoSelection = false;
  projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  if (!list.contains(projectName)) {
    list.add(projectName);
  projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  if (!list.contains(projectName)) {
    list.add(projectName);
  projectName = WTPPlugin.isPlatformCaseSensitive() ? actualProjectName : actualProjectName.toLowerCase();
  if (!list.contains(projectName)) {
    list.add(projectName);

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

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

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

return WTPCommonPlugin.createWarningStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1, new Object[] { tempProjectName,
      tempArchive.getPath() }));
} else if (!WTPPlugin.isPlatformCaseSensitive()) {
  if (tempProjectName.toLowerCase().equals(earProjectName.toLowerCase())) {
    return WTPCommonPlugin.createWarningStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1a, new Object[] { earProjectName,
  return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1, new Object[] { tempProjectName,
      tempArchive.getPath() }));
} else if (!WTPPlugin.isPlatformCaseSensitive()) {
  if (tempProjectName.toLowerCase().equals(earProjectName.toLowerCase())) {
    return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_1a, new Object[] { earProjectName,
  return WTPCommonPlugin.createErrorStatus(EARCreationResourceHandler.bind(EARCreationResourceHandler.EARImportDataModel_UI_2, new Object[] { tempProjectName,
      tempArchive.getPath(), ((Archive) projects.get(tempProjectName)).getURI() }));
} else if (!WTPPlugin.isPlatformCaseSensitive()) {
  String lowerCaseProjectName = tempProjectName.toLowerCase();
  String currentKey = null;

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

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

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com