Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Project Outline View #3565

Open
sinemakinci1 opened this issue Feb 1, 2024 · 3 comments
Open

Updates to Project Outline View #3565

sinemakinci1 opened this issue Feb 1, 2024 · 3 comments
Assignees
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: Project Outline View
Milestone

Comments

@sinemakinci1
Copy link
Contributor

sinemakinci1 commented Feb 1, 2024

Brief Issue Summary

We are planning updates to the Project Outline View in the CMake Side Bar to make it easier to locate your targets, especially in larger projects. This ticket is to garner feedback from the community. Our current proposal is to make a flat view of Targets similar to the CMake Targets View in Visual Studio, with their respective CMakeLists.txt files underneath.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@sinemakinci1 sinemakinci1 pinned this issue Feb 1, 2024
@github-actions github-actions bot added the triage label Feb 1, 2024
@github-project-automation github-project-automation bot moved this to Triage Needed in CMake Tools Feb 1, 2024
@gcampbell-msft gcampbell-msft added enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: Project Outline View and removed triage labels Feb 6, 2024
@gcampbell-msft gcampbell-msft moved this from Triage Needed to Pending Prioritization in CMake Tools Feb 6, 2024
@gcampbell-msft gcampbell-msft modified the milestones: 1.18, On Deck Feb 6, 2024
@gcampbell-msft gcampbell-msft modified the milestones: On Deck, 1.18 Mar 1, 2024
@gcampbell-msft gcampbell-msft modified the milestones: 1.18, On Deck Apr 2, 2024
@gcampbell-msft
Copy link
Collaborator

#3684

@bradphelan
Copy link

bradphelan commented Apr 17, 2024

Filtering and bookmarking

We have 100's of CMakeTargets. It doesn't matter if it's a flat list or a tree but there needs to be a way to search and bookmark.

Reveal in Project Outline

Right clicking on a CMakeLists.txt or any file associated with a cmake target should make available a CMake: Reveal in project outline similar to
image

Compile single file

Don't use the compilecommand.json to compile single files as it breaks on windows if the command line is too long. I use ninja build which manages too long command lines via response file and have a custom task to do this.

{
    "type": "shell",
    "label": "CMake: Build Current File",
    "windows": {
        "command": "cmake",
        "args": [
            "--build",
            "${command:cmake.buildDirectory}",
            "--config",
            "${command:cmake.buildType}",
            "--target",
            "${file}^"
        ]
    },
    "options": {
        "cwd": "${command:cmake.buildDirectory}"
    },
    "group": "build",
    "problemMatcher": [
        "$msCompile"
    ],
    "detail": "Build the currently selected file with incredibuild",
    "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": true,
        "panel": "shared",
        "showReuseMessage": true,
        "clear": false
    }
}

it would be good if the default Compile Active File task worked this way in the project outline and the right click on file tab.

Launching under Incredibuild

I have a custom task to launch the current target under incredibuild.

{
	"type": "shell",
	"label": "CMake-IB: Build Current Target",
	"windows": {
		"command": "ibconsole",
		"args": [
			"/command='cmake --build ${command:cmake.buildDirectory} --config ${command:cmake.buildType} --target ${command:cmake.buildTargetName}  '",
			"/profile='${workspaceFolder}\\cmake\\ccache\\ib.xml'"
		]
	},
	"options": {
		"cwd": "${command:cmake.buildDirectory}"
	},
	"group": "build",
	"problemMatcher": [
		"$msCompile"
	],
	"detail": "Build the currently selected cmake target with incredibuild",
	"presentation": {
		"echo": true,
		"reveal": "always",
		"focus": false,
		"panel": "shared",
		"showReuseMessage": true,
		"clear": true
	}
}

essentially it requires launching cmake under the ibconsole process. Maybe there is a way to do this already but it is not clear how to do this. It should be possible that right the click build action
image
runs cmake under ibconsole.exe.

@astamp-zebra
Copy link

astamp-zebra commented May 29, 2024

After using the latest version of the plugin (1.18.41) with the flattened outline view it is much more difficult to locate specific targets.
In our codebase we have around 100 subprojects that are added from the root CMakeLists.txt with add_subdirectory. Each subdirectory's CMakeLists.txt has a main target, a unit test target, and a lint target.

Is there consideration for an option to restore the hierarchical view for projects where the directory structure organizes the targets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: Project Outline View
Projects
Status: Pending Prioritization
Development

No branches or pull requests

5 participants