Skip to content

How to open a view at a specific position #2813

Closed

Description

@jdneo

Apologize if this is not the right place to ask question.

I'm developing a plugin that has a customized view. And I hope when the view is opened, it can be located at the right of the IDE. (currently it appears at bottom).

I found something like this:

<extension
	point="org.eclipse.ui.perspectiveExtensions">
	<perspectiveExtension
		targetID="*">
		<view
			id="com.microsoft.copilot.eclipse.ui.chat.ChatView"
			minimized="false"
			relationship="right"
			relative="?"
		>
		</view>
	</perspectiveExtension>
</extension>

But have no idea what to fill in the relative field. Could you please advise?

Thank you for your assistance.

Activity

  1. mickaelistria commented on Feb 25, 2025

    @mickaelistria
    Contributor

    relative would be the id of another view in the perspective. You won't be able to find a generic "relative" that applies too all perspectives.
    For what you're trying to achieve, I think it could be simpler to let your plugin get the IPartService and add some IPartListener on startup to react to the view being opened.

  2. jdneo commented on Feb 25, 2025

    @jdneo
    Author

    @mickaelistria Thank you for the quick response!

    For what you're trying to achieve, I think it could be simpler to let your plugin get the IPartService and add some IPartListener on startup to react to the view being opened.

    A little bit lost for this. Would you mind give more details?

  3. laeubi commented on Feb 25, 2025

    @laeubi
    Contributor

    I think here are several ways. So you should maybe describe what means

    it can be located at the right of the IDE. (currently it appears at bottom)

    because "right" and "bottom" depend on the current perspective, in general you likely talk about part stacks (!) where you want to place your view ...

  4. locked and limited conversation to collaborators on Feb 25, 2025
  5. converted this issue into a discussion #2814 on Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions