Java Code Examples for com.intellij.openapi.module.Module#getModuleFilePath()

The following examples show how to use com.intellij.openapi.module.Module#getModuleFilePath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PropertiesCompletionProvider.java    From component-runtime with Apache License 2.0 5 votes vote down vote up
private String getPropertiesPackage(final Module module, final CompletionParameters completionParameters) {
    final String moduleFilePath = module.getModuleFilePath();
    final String moduleName = module.getName();
    final String moduleDirPath = moduleFilePath.replace(moduleName + ".iml", "");
    final String propPath = completionParameters.getOriginalFile().getVirtualFile().getPath();
    return propPath
            .replace(moduleDirPath, "")
            .replace("/", ".")
            .replace("\\", ".")
            .replace("src.main.resources.", "")
            .replace("src.test.resources.", "")
            .replace("." + completionParameters.getOriginalFile().getName(), "");
}
 
Example 2
Source File: PsiUtilsImpl.java    From intellij-quarkus with Eclipse Public License 2.0 4 votes vote down vote up
public static String getProjectURI(Module module) {
    return module.getModuleFilePath();
}