Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Read-only diagram
Read-only diagram [message #168407] Wed, 16 January 2008 13:41 Go to next message
Youmm P. is currently offline Youmm P.Friend
Messages: 140
Registered: July 2009
Senior Member
Hello,

Is there a way to display a diagram to the user but as a read-only
diagram? That is, no modifications of the diagram are allowed.
Re: Read-only diagram [message #168445 is a reply to message #168407] Wed, 16 January 2008 13:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------040009080200080809020300
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Youmm,

This map in AdapterFactoryEditingDomain probably helps:

/**
* Returns the map of resource to a Boolean value indicating
whether the resource is read only.
*/
public Map<Resource, Boolean> getResourceToReadOnlyMap()
{
return resourceToReadOnlyMap;
}


Youmm P. wrote:
> Hello,
>
> Is there a way to display a diagram to the user but as a read-only
> diagram? That is, no modifications of the diagram are allowed.


--------------040009080200080809020300
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Youmm,<br>
<br>
This map in AdapterFactoryEditingDomain probably helps:<br>
<blockquote>&nbsp; /**<br>
&nbsp;&nbsp; * Returns the map of resource to a Boolean value indicating whether
the resource is read only.<br>
&nbsp;&nbsp; */<br>
&nbsp; public Map&lt;Resource, Boolean&gt; getResourceToReadOnlyMap()<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; return resourceToReadOnlyMap;<br>
&nbsp; }<br>
</blockquote>
<br>
Youmm P. wrote:
<blockquote cite="mid:fml16c$9d6$1@build.eclipse.org" type="cite">Hello,
<br>
<br>
Is there a way to display a diagram to the user but as a read-only
diagram? That is, no modifications of the diagram are allowed.
<br>
</blockquote>
<br>
</body>
</html>

--------------040009080200080809020300--
Re: Read-only diagram [message #168467 is a reply to message #168407] Wed, 16 January 2008 14:14 Go to previous message
Boris Blajer is currently offline Boris BlajerFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Youmm,

Take a look at IGraphicalEditPart#disableEditMode() if you need to
disable everything at once. This will disable all commands (except those
provided in response to REQ_OPEN request), and no feedback for the
commands will be shown.

Best regards,
Boris

Youmm P. wrote:
> Hello,
>
> Is there a way to display a diagram to the user but as a read-only
> diagram? That is, no modifications of the diagram are allowed.
Previous Topic:Problems with saving the diagram and with deleting links
Next Topic:how do dynamic popup menus
Goto Forum:
  


Current Time: Thu Apr 18 01:37:39 GMT 2024

Powered by FUDForum. Page generated in 0.01972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top