コード例 #1
0
    /**
     *
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     *
     * @generated
     */
    protected boolean validatePage() {
      URI fileURI = getFileURI();
      if (fileURI == null || fileURI.isEmpty()) {
        setErrorMessage(null);
        return false;
      }

      String extension = fileURI.fileExtension();
      if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
        String key =
            FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
        setErrorMessage(
            WorkaroundEditorPlugin.INSTANCE.getString(
                key, new Object[] {FORMATTED_FILE_EXTENSIONS}));
        return false;
      }

      setErrorMessage(null);
      return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
    }
コード例 #2
0
 public static void dumpURI(URI uri, Logger logger) {
   logger.debug("URI: " + uri);
   logger.debug("authority: " + uri.authority());
   logger.debug("device: " + uri.device());
   logger.debug("devicePath: " + uri.devicePath());
   logger.debug("fileExtension: " + uri.fileExtension());
   logger.debug("fragment: " + uri.fragment());
   logger.debug("host: " + uri.host());
   logger.debug("lastSegment: " + uri.lastSegment());
   logger.debug("opaquePart: " + uri.opaquePart());
   logger.debug("path: " + uri.path());
   logger.debug("port: " + uri.port());
   logger.debug("query: " + uri.query());
   logger.debug("scheme: " + uri.scheme());
   logger.debug("segmentCount: " + uri.segmentCount());
   logger.debug("toFileString: " + uri.toFileString());
   logger.debug("userInfo: " + uri.userInfo());
   logger.debug("hasAbsolutePath: " + uri.hasAbsolutePath());
   logger.debug("schemehasAbsolutePath: " + uri.hasAbsolutePath());
   logger.debug("hasAuthority: " + uri.hasAuthority());
   logger.debug("hasDevice: " + uri.hasDevice());
   logger.debug("hasEmptyPath: " + uri.hasEmptyPath());
   logger.debug("hasFragment: " + uri.hasFragment());
   logger.debug("hasOpaquePart: " + uri.hasOpaquePart());
   logger.debug("hasPath: " + uri.hasPath());
   logger.debug("hasQuery: " + uri.hasQuery());
   logger.debug("hasRelativePath: " + uri.hasRelativePath());
   logger.debug("hasTrailingPathSeparator: " + uri.hasTrailingPathSeparator());
   logger.debug("isCurrentDocumentReference: " + uri.isCurrentDocumentReference());
   logger.debug("isEmpty: " + uri.isEmpty());
   logger.debug("isFile: " + uri.isFile());
   logger.debug("isHierarchical: " + uri.isHierarchical());
   logger.debug("isPrefix: " + uri.isPrefix());
   logger.debug("isRelative: " + uri.isRelative());
   logger.debug("segments: " + uri.segments());
 }