|
Lines 205-216
Link Here
|
| 205 |
* @return the visibility of the part menu. |
205 |
* @return the visibility of the part menu. |
| 206 |
*/ |
206 |
*/ |
| 207 |
public boolean isPartMenuVisible() { |
207 |
public boolean isPartMenuVisible() { |
| 208 |
boolean result = false; |
208 |
boolean result = true; |
| 209 |
if( stackPresentation instanceof ConfigurableStack ) { |
209 |
if( !allActionsVisible() ) { |
| 210 |
ConfigurableStack configStack = ( ConfigurableStack )stackPresentation; |
210 |
if( stackPresentation instanceof ConfigurableStack ) { |
| 211 |
String paneId = configStack.getPaneId( site ); |
211 |
ConfigurableStack configStack = ( ConfigurableStack )stackPresentation; |
| 212 |
String identifier = getPartMenuIdentifier( paneId ); |
212 |
String paneId = configStack.getPaneId( site ); |
| 213 |
result = loadPartmenuVisibility( identifier ); |
213 |
String identifier = getPartMenuIdentifier( paneId ); |
|
|
214 |
result = loadPartmenuVisibility( identifier ); |
| 215 |
} |
| 214 |
} |
216 |
} |
| 215 |
return result; |
217 |
return result; |
| 216 |
} |
218 |
} |
|
Lines 243-255
Link Here
|
| 243 |
public boolean isViewActionVisibile( |
245 |
public boolean isViewActionVisibile( |
| 244 |
final String viewId, final String actionId ) |
246 |
final String viewId, final String actionId ) |
| 245 |
{ |
247 |
{ |
|
|
248 |
boolean result = true; |
| 249 |
if( !allActionsVisible() ) { |
| 250 |
String identifier = getActionIdentifier( viewId, actionId ); |
| 251 |
ScopedPreferenceStore prefStore |
| 252 |
= ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore(); |
| 253 |
result = prefStore.getBoolean( identifier ); |
| 254 |
} |
| 255 |
return result; |
| 256 |
} |
| 257 |
|
| 258 |
private boolean allActionsVisible() { |
| 246 |
boolean result = false; |
259 |
boolean result = false; |
| 247 |
String identifier = getActionIdentifier( viewId, actionId ); |
260 |
// check if all actions are visible or not |
| 248 |
|
261 |
IPreferenceStore apiPreferenceStore = PrefUtil.getAPIPreferenceStore(); |
| 249 |
ScopedPreferenceStore prefStore |
262 |
result = apiPreferenceStore.getBoolean( "viewactionsVisible" ); |
| 250 |
= ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore(); |
|
|
| 251 |
result = prefStore.getBoolean( identifier ); |
| 252 |
|
| 253 |
return result; |
263 |
return result; |
| 254 |
} |
264 |
} |
| 255 |
|
265 |
|