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


Java VfsBundle.message方法代码示例

本文整理汇总了Java中com.intellij.openapi.vfs.VfsBundle.message方法的典型用法代码示例。如果您正苦于以下问题:Java VfsBundle.message方法的具体用法?Java VfsBundle.message怎么用?Java VfsBundle.message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.vfs.VfsBundle的用法示例。


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

示例1: copy

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public VirtualFile copy(final Object requestor, @NotNull final VirtualFile newParent, @NotNull final String copyName) throws IOException {
  if (getFileSystem() != newParent.getFileSystem()) {
    throw new IOException(VfsBundle.message("file.copy.error", newParent.getPresentableUrl()));
  }

  if (!newParent.isDirectory()) {
    throw new IOException(VfsBundle.message("file.copy.target.must.be.directory"));
  }

  return EncodingRegistry.doActionAndRestoreEncoding(this, new ThrowableComputable<VirtualFile, IOException>() {
    @Override
    public VirtualFile compute() throws IOException {
      return ourPersistence.copyFile(requestor, VirtualFileSystemEntry.this, newParent, copyName);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:VirtualFileSystemEntry.java

示例2: rename

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void rename(final Object requestor, @NotNull @NonNls final String newName) throws IOException {
  if (getName().equals(newName)) return;
  if (!isValidName(newName)) {
    throw new IOException(VfsBundle.message("file.invalid.name.error", newName));
  }

  ourPersistence.renameFile(requestor, this, newName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:VirtualFileSystemEntry.java

示例3: move

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void move(final Object requestor, @NotNull final VirtualFile newParent) throws IOException {
  if (getFileSystem() != newParent.getFileSystem()) {
    throw new IOException(VfsBundle.message("file.move.error", newParent.getPresentableUrl()));
  }

  EncodingRegistry.doActionAndRestoreEncoding(this, new ThrowableComputable<VirtualFile, IOException>() {
    @Override
    public VirtualFile compute() throws IOException {
      ourPersistence.moveFile(requestor, VirtualFileSystemEntry.this, newParent);
      return VirtualFileSystemEntry.this;
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:VirtualFileSystemEntry.java

示例4: setNewName

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
public void setNewName(@NotNull String newName) {
  if (!isValidName(newName)) {
    throw new IllegalArgumentException(VfsBundle.message("file.invalid.name.error", newName));
  }

  VirtualDirectoryImpl parent = getParent();
  parent.removeChild(this);
  mySegment.setNameId(myId, FileNameCache.storeName(newName));
  ((PersistentFSImpl)PersistentFS.getInstance()).incStructuralModificationCount();
  parent.addChild(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:VirtualFileSystemEntry.java

示例5: reportIOErrorWithJars

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
private void reportIOErrorWithJars(File original, File target, IOException e) {
  LOG.warn(e);

  String path = original.getPath();
  myFileSystem.setNoCopyJarForPath(path);

  String message = VfsBundle.message("jar.copy.error.message", path, target.getPath(), e.getMessage());
  ERROR_COPY_NOTIFICATION.getValue().createNotification(message, NotificationType.ERROR).notify(null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JarHandler.java

示例6: reportIOErrorWithJars

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
private void reportIOErrorWithJars(File original, File mirror, IOException e) {
  LOG.warn(e);
  final String path = original.getPath();
  final String message = VfsBundle.message("jar.copy.error.message", path, mirror.getPath(), e.getMessage());

  ERROR_COPY_NOTIFICATION.getValue().createNotification(message, NotificationType.ERROR).notify(null);

  myFileSystem.setNoCopyJarForPath(path);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:JarHandler.java

示例7: checkSetName

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void checkSetName(String name) throws IncorrectOperationException {
  //CheckUtil.checkIsIdentifier(name);
  CheckUtil.checkWritable(this);
  VirtualFile parentFile = myFile.getParent();
  if (parentFile == null) {
    throw new IncorrectOperationException(VfsBundle.message("cannot.rename.root.directory"));
  }
  VirtualFile child = parentFile.findChild(name);
  if (child != null && !child.equals(myFile)) {
    throw new IncorrectOperationException(VfsBundle.message("file.already.exists.error", child.getPresentableUrl()));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:PsiDirectoryImpl.java

示例8: checkCreateSubdirectory

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void checkCreateSubdirectory(@NotNull String name) throws IncorrectOperationException {
  // TODO : another check?
  //CheckUtil.checkIsIdentifier(name);
  VirtualFile existingFile = getVirtualFile().findChild(name);
  if (existingFile != null) {
    throw new IncorrectOperationException(VfsBundle.message("file.already.exists.error", existingFile.getPresentableUrl()));
  }
  CheckUtil.checkWritable(this);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:PsiDirectoryImpl.java

示例9: checkCreateFile

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void checkCreateFile(@NotNull String name) throws IncorrectOperationException {
  VirtualFile existingFile = getVirtualFile().findChild(name);
  if (existingFile != null) {
    throw new IncorrectOperationException(VfsBundle.message("file.already.exists.error", existingFile.getPresentableUrl()));
  }
  CheckUtil.checkWritable(this);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:PsiDirectoryImpl.java

示例10: copy

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public VirtualFile copy(final Object requestor, @Nonnull final VirtualFile newParent, @Nonnull final String copyName) throws IOException {
  if (getFileSystem() != newParent.getFileSystem()) {
    throw new IOException(VfsBundle.message("file.copy.error", newParent.getPresentableUrl()));
  }

  if (!newParent.isDirectory()) {
    throw new IOException(VfsBundle.message("file.copy.target.must.be.directory"));
  }

  return EncodingRegistry.doActionAndRestoreEncoding(this, () -> ourPersistence.copyFile(requestor, this, newParent, copyName));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:VirtualFileSystemEntry.java

示例11: move

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void move(final Object requestor, @Nonnull final VirtualFile newParent) throws IOException {
  if (getFileSystem() != newParent.getFileSystem()) {
    throw new IOException(VfsBundle.message("file.move.error", newParent.getPresentableUrl()));
  }

  EncodingRegistry.doActionAndRestoreEncoding(this, () -> {
    ourPersistence.moveFile(requestor, this, newParent);
    return this;
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:VirtualFileSystemEntry.java

示例12: setNewName

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
public void setNewName(@Nonnull String newName) {
  if (!getFileSystem().isValidName(newName)) {
    throw new IllegalArgumentException(VfsBundle.message("file.invalid.name.error", newName));
  }

  VirtualDirectoryImpl parent = getParent();
  parent.removeChild(this);
  mySegment.setNameId(myId, FileNameCache.storeName(newName));
  ((PersistentFSImpl)PersistentFS.getInstance()).incStructuralModificationCount();
  parent.addChild(this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:VirtualFileSystemEntry.java

示例13: checkCreateSubdirectory

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void checkCreateSubdirectory(@Nonnull String name) throws IncorrectOperationException {
  // TODO : another check?
  //CheckUtil.checkIsIdentifier(name);
  VirtualFile existingFile = getVirtualFile().findChild(name);
  if (existingFile != null) {
    throw new IncorrectOperationException(VfsBundle.message("file.already.exists.error", existingFile.getPresentableUrl()));
  }
  CheckUtil.checkWritable(this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:PsiDirectoryImpl.java

示例14: checkCreateFile

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@Override
public void checkCreateFile(@Nonnull String name) throws IncorrectOperationException {
  VirtualFile existingFile = getVirtualFile().findChild(name);
  if (existingFile != null) {
    throw new IncorrectOperationException(VfsBundle.message("file.already.exists.error", existingFile.getPresentableUrl()));
  }

  for (PsiDirectoryMethodProxy proxy : PsiDirectoryMethodProxy.EP_NAME.getExtensions()) {
    if(!proxy.checkCreateFile(this, name)) {
      return;
    }
  }

  CheckUtil.checkWritable(this);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:PsiDirectoryImpl.java

示例15: copyFile

import com.intellij.openapi.vfs.VfsBundle; //导入方法依赖的package包/类
@NotNull
@Override
public VirtualFile copyFile(Object requestor, @NotNull VirtualFile file, @NotNull VirtualFile newParent, @NotNull String copyName) throws IOException {
  throw new IOException(VfsBundle.message("jar.modification.not.supported.error", file.getUrl()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ArchiveFileSystem.java


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