Codota Logo
ClientConfigRemovedMessage$Event
Code IndexAdd Codota to your IDE (free)

How to use
ClientConfigRemovedMessage$Event
in
net.groboclown.p4.server.api.messagebus

Best Java code snippets using net.groboclown.p4.server.api.messagebus.ClientConfigRemovedMessage$Event (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: groboclown/p4ic4idea

ClientConfigAddedMessage.addListener(projClient, this, (e) -> clientConfigs.put(e.getRoot(), e.getClientConfig()));
ClientConfigRemovedMessage.addListener(projClient, this,
    (event) -> clientConfigs.remove(event.getVcsRootDir()));
ClientConfigAddedMessage.addServerListener(appClient, this,
origin: groboclown/p4ic4idea

public static void reportClientConfigRemoved(@NotNull Project project, @NotNull Object src,
    @NotNull ClientConfig config, @Nullable VirtualFile vcsRootDir) {
  getListener(project, TOPIC, DEFAULT_LISTENER).clientConfigurationRemoved(new Event(src, config, vcsRootDir));
}
origin: groboclown/p4ic4idea

@Override
public void projectOpened(Project project) {
  MessageBusClient.ProjectClient projectMbClient =
      MessageBusClient.forProject(project, InvalidPasswordMonitorComponent.this);
  ClientConfigAddedMessage.addListener(projectMbClient, this,
      e -> forgetLoginProblem(e.getClientConfig().getServerConfig()));
  ClientConfigRemovedMessage.addListener(projectMbClient, this,
      event -> forgetLoginProblem(event.getClientConfig().getServerConfig()));
}
origin: groboclown/p4ic4idea

@Test
void removeClientConfig_notRegistered() {
  ProjectConfigRegistry registry = new ProjectConfigRegistryImpl(idea.getMockProject());
  final List<ClientConfig> removed = new ArrayList<>();
  MessageBusClient.ProjectClient client = MessageBusClient.forProject(idea.getMockProject(), idea.getMockProject());
  ClientConfigAddedMessage.addListener(client, this,
      e -> fail("should not have added anything"));
  ClientConfigRemovedMessage.addListener(client, this, (e) -> removed.add(e.getClientConfig()));
  ClientConfig config = createClientConfig();
  registry.removeClientConfigAt(MockVirtualFileSystem.createRoot());
  assertEquals(0, removed.size());
  ClientConfig fetchedState = registry.getRegisteredClientConfigState(config.getClientServerRef());
  assertNull(fetchedState);
}
origin: groboclown/p4ic4idea

@Test
void removeClientConfig_registered() {
  ProjectConfigRegistry registry = new ProjectConfigRegistryImpl(idea.getMockProject());
  final List<ClientConfig> added = new ArrayList<>();
  final List<ClientConfig> removed = new ArrayList<>();
  MessageBusClient.ProjectClient client = MessageBusClient.forProject(idea.getMockProject(), idea.getMockProject());
  ClientConfigAddedMessage.addListener(client, this, e -> added.add(e.getClientConfig()));
  ClientConfigRemovedMessage.addListener(client, this, (e) -> removed.add(e.getClientConfig()));
  ClientConfig config = createClientConfig();
  VirtualFile root = MockVirtualFileSystem.createRoot();
  registry.addClientConfig(config, root);
  assertEquals(1, added.size());
  added.clear();
  registry.removeClientConfigAt(root);
  assertEquals(0, added.size());
  assertEquals(1, removed.size());
  assertSame(config, removed.get(0));
  ClientConfig fetchedState = registry.getRegisteredClientConfigState(config.getClientServerRef());
  assertNull(fetchedState);
}
origin: groboclown/p4ic4idea

@Test
void projectClosed() {
  ProjectConfigRegistry registry = new ProjectConfigRegistryImpl(idea.getMockProject());
  final List<ClientConfig> added = new ArrayList<>();
  final List<ClientConfig> removed = new ArrayList<>();
  MessageBusClient.ProjectClient client = MessageBusClient.forProject(idea.getMockProject(), idea.getMockProject());
  ClientConfigAddedMessage.addListener(client, this, e -> added.add(e.getClientConfig()));
  ClientConfigRemovedMessage.addListener(client, this, (e) -> removed.add(e.getClientConfig()));
  ClientConfig config = createClientConfig();
  VirtualFile root = MockVirtualFileSystem.createRoot();
  registry.addClientConfig(config, root);
  assertEquals(1, added.size());
  added.clear();
  registry.projectClosed();
  assertEquals(0, added.size());
  assertEquals(1, removed.size());
  assertSame(config, removed.get(0));
  ClientConfig fetchedState = registry.getRegisteredClientConfigState(config.getClientServerRef());
  assertNull(fetchedState);
  // closing the project should turn off further registration
  removed.clear();
  assertThrows(Throwable.class, () -> registry.addClientConfig(config, root));
  assertEquals(0, added.size());
  assertThrows(Throwable.class, () -> registry.removeClientConfigAt(root));
  assertEquals(0, removed.size());
}
origin: groboclown/p4ic4idea

@Test
void disposeComponent() {
  ProjectConfigRegistry registry = new ProjectConfigRegistryImpl(idea.getMockProject());
  final List<ClientConfig> added = new ArrayList<>();
  final List<ClientConfig> removed = new ArrayList<>();
  MessageBusClient.ProjectClient client = MessageBusClient.forProject(idea.getMockProject(), idea.getMockProject());
  ClientConfigAddedMessage.addListener(client, this, e -> added.add(e.getClientConfig()));
  ClientConfigRemovedMessage.addListener(client, this, (e) -> removed.add(e.getClientConfig()));
  ClientConfig config = createClientConfig();
  VirtualFile root = MockVirtualFileSystem.createRoot();
  registry.addClientConfig(config, root);
  assertEquals(1, added.size());
  added.clear();
  registry.disposeComponent();
  assertEquals(0, added.size());
  assertEquals(1, removed.size());
  assertSame(config, removed.get(0));
  ClientConfig fetchedState =
      registry.getRegisteredClientConfigState(config.getClientServerRef());
  assertNull(fetchedState);
  // closing the project should turn off further registration
  removed.clear();
  assertThrows(Throwable.class, () -> registry.addClientConfig(config, root));
  assertEquals(0, added.size());
  assertThrows(Throwable.class, () -> registry.removeClientConfigAt(root));
  assertEquals(0, removed.size());
}
origin: groboclown/p4ic4idea

ServerConnectedMessage.addListener(applicationBusClient, this, this::onServerConnected);
ClientConfigRemovedMessage.addListener(projectBusClient, this, event -> {
  if (! ProjectConfigRegistry.this.equals(event.getEventSource())) {
    onClientRemoved(event.getClientConfig(), event.getVcsRootDir());
origin: groboclown/p4ic4idea

MessageBusClient.ProjectClient client = MessageBusClient.forProject(idea.getMockProject(), idea.getMockProject());
ClientConfigAddedMessage.addListener(client, this, e -> added.add(e.getClientConfig()));
ClientConfigRemovedMessage.addListener(client, this, (e) -> removed.add(e.getClientConfig()));
ClientConfig config = createClientConfig();
MockVirtualFile root = MockVirtualFileSystem.createRoot();
net.groboclown.p4.server.api.messagebusClientConfigRemovedMessage$Event

Most used methods

  • getClientConfig
  • getVcsRootDir
  • <init>
  • getEventSource

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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