Package com.intellij.refactoring

Examples of com.intellij.refactoring.PackageWrapper


     * @param module        Module
     * @return              Selected Directory or null if canceled/error
     */
    @Nullable
    public static PsiDirectory selectTargetDirectory(@NotNull final String packageName, @NotNull final Project project, @NotNull final Module module) {
        final PackageWrapper targetPackage = new PackageWrapper(PsiManager.getInstance(project), packageName);

        final VirtualFile selectedRoot = new ReadAction<VirtualFile>() {
            @Override
            protected void run(@NotNull Result<VirtualFile> result) throws Throwable {
                VirtualFile[] roots = getResourceRoots(module);
View Full Code Here


                                          @Nullable final String path) {
    final PsiManager manager = PsiManager.getInstance(project);
    final String actionClassQualifiedName = actionClass.getQualifiedName();
    assert actionClassQualifiedName != null;

    final PackageWrapper targetPackage =
        new PackageWrapper(manager, StringUtil.getPackageName(actionClassQualifiedName));

    final Module module = ModuleUtilCore.findModuleForPsiElement(actionClass);
    assert module != null;
    final List<VirtualFile> sourceRoots = ModuleRootManager.getInstance(module).getSourceRoots(JavaModuleSourceRootTypes.PRODUCTION);
    final VirtualFile sourceRoot = sourceRoots.size() == 1 ? sourceRoots.get(0) :
View Full Code Here

TOP

Related Classes of com.intellij.refactoring.PackageWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.