Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] Create a new element in an active context

Hi,

storing branch information in contexts has come up a few times in discussions. This is an important feature and it's great that EGit is driving this already.

We should standardize the interface so we end up with a consistent UI and model across SCM systems. Manuel, could you please open a bug against Mylyn Context requesting that API and describing what you have already? We can then iterate how that is best integrated with context.

Steffen


On Sat, May 7, 2011 at 11:52 AM, Manuel Doninger <manuel.doninger@xxxxxxxxxxxxxx> wrote:
Hi,
how do i manually create and assign a new element to an active
context, if it is not a file in the workspace (like the bookmarks in
Tasktop Pro)? The reason is, i want to store some task related
configurations for EGit in the task context, but so far i couldn't
find the right thing in the Mylyn API.

I thought about something like

List<InteractionContextElement> nodes = new
ArrayList<InteractionContextElement>();
InteractionContextElement node = new
InteractionContextElement("meta/setting", "egitbranchsetting",
(InteractionContext) activeContext); //$NON-NLS-1$ //$NON-NLS-2$
nodes.add(node);
IInteractionElement newElement = new
CompositeContextElement("egitbranchsetting", nodes,
activeContext.getScaling()); //$NON-NLS-1$
activeContext.getAllElements().add(newElement);

but i don't know, if this is right.

The configuration i want to store would be a list of Strings
representing Git repositories, and a String representing a branch in
that repositories.

Manuel
_______________________________________________
mylyn-dev mailing list
mylyn-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-dev



--
Steffen Pingel
Committer, http://eclipse.org/mylyn
Senior Developer, http://tasktop.com

Back to the top