Skip to content

Added reveal functionality for active tab in file explorer and enhanced studio shortcuts#491

Open
stijnpotters1 wants to merge 4 commits into
masterfrom
feat/active-tab-opener
Open

Added reveal functionality for active tab in file explorer and enhanced studio shortcuts#491
stijnpotters1 wants to merge 4 commits into
masterfrom
feat/active-tab-opener

Conversation

@stijnpotters1
Copy link
Copy Markdown
Contributor

Click on icon when tab is open and file tree closed
image
file tree opens to this opened tab
image

Also added shortcut actions to the studio file tree
image

Copy link
Copy Markdown
Member

@philipsens philipsens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice touch disabling the button when it's active.

Comment thread src/main/frontend/app/components/file-structure/studio-file-structure.tsx Outdated
@stijnpotters1 stijnpotters1 changed the title Added reveal functionality for active tab in file explorer and enhanced studio shortvuts Added reveal functionality for active tab in file explorer and enhanced studio shortcuts May 26, 2026
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +249 to +269
private ProjectDirectory resolveProjectDirectory(String projectName, String directoryPath) throws IOException {
try {
ConfigurationProject configurationProject = configurationProjectService.getProject(projectName);
Path projectPath = fileSystemStorage.toAbsolutePath(configurationProject.getRootPath());
Path dirPath = fileSystemStorage.toAbsolutePath(directoryPath).normalize();

if (!dirPath.startsWith(projectPath)) {
throw new SecurityException("Invalid path: outside project directory");
}

if (!Files.exists(dirPath) || !Files.isDirectory(dirPath)) {
throw new IllegalArgumentException("Directory does not exist: " + dirPath);
}

boolean useRelativePaths = !fileSystemStorage.isLocalEnvironment();
Path relativizeRoot = useRelativePaths ? fileSystemStorage.toAbsolutePath("") : projectPath;
return new ProjectDirectory(projectPath, dirPath, relativizeRoot, useRelativePaths);
} catch (ApiException _) {
throw new IllegalArgumentException("Project does not exist: " + projectName);
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git says this is new but doesnt this method exist already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i delegated a big portion of the original getShallowDirectoryTree method into its own method so i could reuse it in the new getAncestorPath method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do you mean something else?

@stijnpotters1 stijnpotters1 requested a review from Matthbo May 26, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically extend file tree, to where your opened file is located

3 participants