Codota Logo
PlaceManager.tryClosePlace
Code IndexAdd Codota to your IDE (free)

How to use
tryClosePlace
method
in
org.uberfire.client.mvp.PlaceManager

Best Java code snippets using org.uberfire.client.mvp.PlaceManager.tryClosePlace (Showing top 9 results out of 315)

  • Common ways to obtain PlaceManager
private void myMethod () {
PlaceManager p =
  • Codota IconMockito mockito;mockito.mock(PlaceManager.class)
  • Smart code suggestions by Codota
}
origin: kiegroup/appformer

public void closeFirstPartAndAddNewOne(Command command) {
  placeManager.tryClosePlace(getPlaceFromFirstPart(),
                command);
}
origin: org.dashbuilder/dashbuilder-dataset-editor

void newDataSet() {
  placeManager.tryClosePlace(new DefaultPlaceRequest("DataSetDefWizard"), () -> {
    placeManager.goTo("DataSetDefWizard");
  });
}
origin: kiegroup/appformer

void newDataSet() {
  placeManager.tryClosePlace(new DefaultPlaceRequest("DataSetDefWizard"), () -> {
    placeManager.goTo("DataSetDefWizard");
  });
}
origin: kiegroup/appformer

@Test
public void testNewDataSet() {
  presenter.newDataSet();
  verify(placeManager).tryClosePlace(eq(new DefaultPlaceRequest("DataSetDefWizard")), any(Command.class));
  verify(placeManager).goTo("DataSetDefWizard");
}

origin: org.uberfire/uberfire-workbench-client

  @Test
  public void closeFirstPartAndAddNewOneTest() {

    PlaceRequest place = mock(PlaceRequest.class);
    PartDefinition part = mock(PartDefinition.class);
    Command cmd = mock(Command.class);

    when(part.getPlace()).thenReturn(place);

    Collection<PartDefinition> parts = Arrays.asList(part);
    singlePartHelper = new SinglePartPanelHelper(parts,
                           placeManager);

    singlePartHelper.closeFirstPartAndAddNewOne(cmd);
    verify(placeManager).tryClosePlace(place,
                      cmd);
  }
}
origin: org.dashbuilder/dashbuilder-dataset-editor

@Test
public void testNewDataSet() {
  presenter.newDataSet();
  verify(placeManager).tryClosePlace(eq(new DefaultPlaceRequest("DataSetDefWizard")), any(Command.class));
  verify(placeManager).goTo("DataSetDefWizard");
}

origin: kiegroup/appformer

  @Test
  public void closeFirstPartAndAddNewOneTest() {

    PlaceRequest place = mock(PlaceRequest.class);
    PartDefinition part = mock(PartDefinition.class);
    Command cmd = mock(Command.class);

    when(part.getPlace()).thenReturn(place);

    Collection<PartDefinition> parts = Arrays.asList(part);
    singlePartHelper = new SinglePartPanelHelper(parts,
                           placeManager);

    singlePartHelper.closeFirstPartAndAddNewOne(cmd);
    verify(placeManager).tryClosePlace(place,
                      cmd);
  }
}
origin: org.dashbuilder/dashbuilder-dataset-editor

@Before
public void setup() throws Exception {
  presenter.services = services;
  assertEquals(explorerWidget, presenter.getView());
  doAnswer(invocationOnMock -> {
    Command callback = (Command ) invocationOnMock.getArguments()[1];
    callback.execute();
    return null;
  }).when(placeManager).tryClosePlace(any(), any());
  doAnswer(invocationOnMock -> {
    RemoteCallback callback = (RemoteCallback) invocationOnMock.getArguments()[0];
    callback.callback(mock(Path.class));
    return null;
  }).when(services).call(any(RemoteCallback.class));
}

origin: kiegroup/appformer

@Before
public void setup() throws Exception {
  presenter.services = services;
  assertEquals(explorerWidget, presenter.getView());
  doAnswer(invocationOnMock -> {
    Command callback = (Command ) invocationOnMock.getArguments()[1];
    callback.execute();
    return null;
  }).when(placeManager).tryClosePlace(any(), any());
  doAnswer(invocationOnMock -> {
    RemoteCallback callback = (RemoteCallback) invocationOnMock.getArguments()[0];
    callback.callback(mock(Path.class));
    return null;
  }).when(services).call(any(RemoteCallback.class));
}

org.uberfire.client.mvpPlaceManagertryClosePlace

Popular methods of PlaceManager

  • goTo
  • closePlace
  • forceClosePlace
  • getStatus
  • closeAllPlaces
  • executeOnCloseCallbacks
  • executeOnOpenCallbacks
  • getActivity
  • registerOnOpenCallback
  • forceCloseAllPlaces
  • getOnOpenCallbacks
  • getUncloseablePlaces
  • getOnOpenCallbacks,
  • getUncloseablePlaces,
  • registerOnCloseCallback,
  • canClosePlace,
  • getActiveSplashScreens,
  • getCurrentPlaceRequest,
  • getOnCloseCallbacks,
  • registerPerspectiveCloseChain

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now