From 7ab794ad77e32188574069385179d8ebd5b20ab5 Mon Sep 17 00:00:00 2001 From: totetmatt Date: Tue, 30 Jun 2026 15:50:52 +0200 Subject: [PATCH 1/5] 0.11 --- modules/BlueskyGephi/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/BlueskyGephi/pom.xml b/modules/BlueskyGephi/pom.xml index 18da75772..2562603bd 100644 --- a/modules/BlueskyGephi/pom.xml +++ b/modules/BlueskyGephi/pom.xml @@ -4,12 +4,12 @@ gephi-plugin-parent org.gephi - 0.10.0 + 0.11.1 fr.totetmatt bluesky-gephi - 0.1.0 + 0.1.1 nbm Bluesky Gephi From eba0e91086f64adb89ebc6c8b7c62ef9fb9b98db Mon Sep 17 00:00:00 2001 From: totetmatt Date: Tue, 30 Jun 2026 17:55:26 +0200 Subject: [PATCH 2/5] Add ATProto Host --- .../fr/totetmatt/blueskygephi/BlueskyGephi.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java index 7efadd9f4..48ddfa6b9 100644 --- a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java +++ b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java @@ -38,6 +38,7 @@ public class BlueskyGephi { protected static final Logger logger = Logger.getLogger(BlueskyGephi.class.getName()); private final static String NBPREF_BSKY_HANDLE = "bsky.handle"; private final static String NBPREF_BSKY_PASSWORD = "bsky.password"; + private final static String NBPREF_ATPROTO_HOST ="bsky.social"; private final static String NBPREF_QUERY = "query"; private final static String NBPREF_QUERY_ISFOLLOWERSACTIVE = "query.isFollowersActive"; private final static String NBPREF_QUERY_ISFOLLOWSACTIVE = "query.isFollowsActive"; @@ -46,8 +47,8 @@ public class BlueskyGephi { private final static String NBPREF_QUERY_LIMITCRAWL = "query.limitCrawl"; private final Preferences nbPref = NbPreferences.forModule(BlueskyGephi.class); - // If ATProto get released and decentralized, this will change to adapt to other instances - final private AtClient client = new AtClient("bsky.social"); + + private AtClient client; private GraphModel graphModel; public BlueskyGephi() { @@ -63,14 +64,18 @@ private void initProjectAndWorkspace() { } } - public boolean connect(String handle, String password) { + public boolean connect(String host,String handle, String password) { nbPref.put(NBPREF_BSKY_HANDLE, handle); nbPref.put(NBPREF_BSKY_PASSWORD, password); + nbPref.put(NBPREF_ATPROTO_HOST,host); + client = new AtClient(host); return client.comAtprotoServerCreateSession(handle, password); } - + public String getHost(){ + return nbPref.get(NBPREF_ATPROTO_HOST,"bsky.social"); + } public String getHandle() { return nbPref.get(NBPREF_BSKY_HANDLE, ""); } From 1aaab3743dd62b773f1d1be23bf7ed029a177605 Mon Sep 17 00:00:00 2001 From: totetmatt Date: Tue, 30 Jun 2026 18:10:39 +0200 Subject: [PATCH 3/5] UI update --- .../blueskygephi/BlueskyGephiMainPanel.form | 38 ++++++++++++++--- .../blueskygephi/BlueskyGephiMainPanel.java | 42 +++++++++++++++---- .../totetmatt/blueskygephi/Bundle.properties | 2 + 3 files changed, 67 insertions(+), 15 deletions(-) diff --git a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.form b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.form index 42402520a..4aaa740d2 100644 --- a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.form +++ b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.form @@ -71,7 +71,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -106,10 +106,15 @@ - + + + + + + @@ -117,8 +122,13 @@ - - + + + + + + + @@ -130,12 +140,28 @@ - + + + + + + + + + + + + + + + + + diff --git a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java index 0cb5f9bfd..6e3e6d3ab 100644 --- a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java +++ b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java @@ -42,7 +42,7 @@ public class BlueskyGephiMainPanel extends TopComponent { public BlueskyGephiMainPanel() { initComponents(); blueskyGephi = Lookup.getDefault().lookup(BlueskyGephi.class); - + credentialsHostField.setText(blueskyGephi.getHost()); credentialsHandleField.setText(blueskyGephi.getHandle()); credentialsPasswordField.setText(blueskyGephi.getPassword()); handleSearchTextArea.setText(blueskyGephi.getQuery()); @@ -64,6 +64,8 @@ public BlueskyGephiMainPanel() { private void initComponents() { credentialsPanel = new javax.swing.JPanel(); + credentialsHostLabel = new javax.swing.JLabel(); + credentialsHostField = new javax.swing.JTextField(); credentialsHandleLabel = new javax.swing.JLabel(); credentialsHandleField = new javax.swing.JTextField(); credentialsPasswordLabel = new javax.swing.JLabel(); @@ -86,6 +88,15 @@ private void initComponents() { credentialsPanel.setToolTipText(org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.Credentials.toolTipText")); // NOI18N credentialsPanel.setName("Credentials"); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(credentialsHostLabel, org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.credentialsHostLabel.text")); // NOI18N + + credentialsHostField.setText(org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.credentialsHostField.text")); // NOI18N + credentialsHostField.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + credentialsHostFieldActionPerformed(evt); + } + }); + org.openide.awt.Mnemonics.setLocalizedText(credentialsHandleLabel, org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.credentialsHandleLabel.text")); // NOI18N credentialsHandleField.setText(org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.credentialsHandleField.text")); // NOI18N @@ -122,14 +133,22 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(credentialsHandleLabel)) .addGap(18, 18, 18) .addGroup(credentialsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(credentialsHandleField) - .addComponent(credentialsPasswordField)))) + .addComponent(credentialsHandleField, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE) + .addComponent(credentialsPasswordField))) + .addGroup(credentialsPanelLayout.createSequentialGroup() + .addComponent(credentialsHostLabel) + .addGap(43, 43, 43) + .addComponent(credentialsHostField, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE))) .addContainerGap()) ); credentialsPanelLayout.setVerticalGroup( credentialsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(credentialsPanelLayout.createSequentialGroup() - .addContainerGap() + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, credentialsPanelLayout.createSequentialGroup() + .addGap(0, 9, Short.MAX_VALUE) + .addGroup(credentialsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(credentialsHostLabel) + .addComponent(credentialsHostField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(credentialsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(credentialsHandleLabel) .addComponent(credentialsHandleField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) @@ -138,8 +157,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(credentialsPasswordLabel) .addComponent(credentialsPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(credentialsConnectButton) - .addContainerGap(15, Short.MAX_VALUE)) + .addComponent(credentialsConnectButton)) ); handleSearchTextArea.setColumns(20); @@ -236,7 +254,7 @@ public void propertyChange(java.beans.PropertyChangeEvent evt) { .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(runFetchButton) - .addContainerGap(51, Short.MAX_VALUE)) + .addContainerGap(29, Short.MAX_VALUE)) ); limitCrawlSpinner.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BlueskyGephiMainPanel.class, "BlueskyGephiMainPanel.limitCrawlSpinner.AccessibleContext.accessibleDescription")); // NOI18N @@ -247,7 +265,7 @@ private void isFollowersActivatedActionPerformed(java.awt.event.ActionEvent evt) }//GEN-LAST:event_isFollowersActivatedActionPerformed private void credentialsConnectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_credentialsConnectButtonActionPerformed - if(blueskyGephi.connect(credentialsHandleField.getText(), String.valueOf(credentialsPasswordField.getPassword()))){ + if(blueskyGephi.connect(credentialsHostField.getText(), credentialsHandleField.getText(), String.valueOf(credentialsPasswordField.getPassword()))){ credentialsConnectButton.setBackground(Color.GREEN); } else { credentialsConnectButton.setBackground(Color.RED); @@ -290,11 +308,17 @@ private void limitCrawlSpinnerPropertyChange(java.beans.PropertyChangeEvent evt) blueskyGephi.setLimitCrawl(Math.max(1,((int)limitCrawlSpinner.getValue())/100)); }//GEN-LAST:event_limitCrawlSpinnerPropertyChange + private void credentialsHostFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_credentialsHostFieldActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_credentialsHostFieldActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton credentialsConnectButton; private javax.swing.JTextField credentialsHandleField; private javax.swing.JLabel credentialsHandleLabel; + private javax.swing.JTextField credentialsHostField; + private javax.swing.JLabel credentialsHostLabel; private javax.swing.JPanel credentialsPanel; private javax.swing.JPasswordField credentialsPasswordField; private javax.swing.JLabel credentialsPasswordLabel; diff --git a/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties b/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties index 30123d975..605ccce43 100644 --- a/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties +++ b/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties @@ -14,3 +14,5 @@ BlueskyGephiMainPanel.isDeepSearch.text=Fetch also n+1 BlueskyGephiMainPanel.limitCrawlCheckbox.text=Crawl Limit BlueskyGephiMainPanel.limitCrawlSpinner.AccessibleContext.accessibleDescription= BlueskyGephiMainPanel.limitCrawlSpinner.toolTipText=Nb Follower / Following to fetch max on a n+1 crawl +BlueskyGephiMainPanel.credentialsHostLabel.text=Host +BlueskyGephiMainPanel.credentialsHostField.text= From 9d4d0a79e52b945fe61dc7e484fe814f6a5e8c11 Mon Sep 17 00:00:00 2001 From: totetmatt Date: Tue, 30 Jun 2026 19:04:06 +0200 Subject: [PATCH 4/5] BlueskyGephi 0.2.1 --- modules/BlueskyGephi/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/BlueskyGephi/pom.xml b/modules/BlueskyGephi/pom.xml index 2562603bd..8f0308d59 100644 --- a/modules/BlueskyGephi/pom.xml +++ b/modules/BlueskyGephi/pom.xml @@ -9,7 +9,7 @@ fr.totetmatt bluesky-gephi - 0.1.1 + 0.2.1 nbm Bluesky Gephi From 32178e4c1d7d64b7927795664b4edb01c436b595 Mon Sep 17 00:00:00 2001 From: totetmatt Date: Thu, 2 Jul 2026 00:06:14 +0200 Subject: [PATCH 5/5] Improvment --- .../totetmatt/blueskygephi/BlueskyGephi.java | 6 ++--- .../blueskygephi/BlueskyGephiMainPanel.java | 26 +++++++++++-------- .../totetmatt/blueskygephi/Bundle.properties | 2 ++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java index 48ddfa6b9..dcffd5525 100644 --- a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java +++ b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephi.java @@ -52,11 +52,9 @@ public class BlueskyGephi { private GraphModel graphModel; public BlueskyGephi() { - initProjectAndWorkspace(); - } - private void initProjectAndWorkspace() { + private void ensureProject() { ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class); Project currentProject = projectController.getCurrentProject(); if (currentProject == null) { @@ -275,12 +273,14 @@ private void initGraphTable() { } public void fetchFollowerFollowsFromActors(List actors, boolean isFollowsActive, boolean isFollowersActive, boolean isBlocksActive) { + ensureProject(); graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(); initGraphTable(); actors.stream().forEach(actor -> fetchFollowerFollowsFromActor(actor, null, isFollowsActive, isFollowersActive, getIsDeepSearch())); } public void fetchFollowerFollowsFromActors(List actors) { + ensureProject(); graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(); initGraphTable(); actors diff --git a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java index 6e3e6d3ab..1d114dc24 100644 --- a/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java +++ b/modules/BlueskyGephi/src/main/java/fr/totetmatt/blueskygephi/BlueskyGephiMainPanel.java @@ -16,32 +16,36 @@ import org.openide.awt.ActionReference; import org.openide.util.Exceptions; import org.openide.util.Lookup; +import org.openide.util.NbBundle; import org.openide.windows.TopComponent; /** * * @author totetmatt */ - @TopComponent.Description(preferredID = "BlueskyGephiMainPanel", - iconBase = "fr/totetmatt/gephi/twitter/twitterlogo.png" -) - - -@ActionReference(path = "Menu/Window", position = 334) -@TopComponent.OpenActionRegistration(displayName = "Bluesky Gephi", - preferredID = "MainTwitterStreamerWindow") + persistenceType = TopComponent.PERSISTENCE_ALWAYS) +@TopComponent.Registration(mode = "layoutmode", openAtStartup = true, roles = {"overview"}, position = 2) @ActionID(category = "Window", id = "fr.totetmatt.blueskygephi.BlueskyGephiMainPanel") -@TopComponent.Registration(mode = "layoutmode", openAtStartup = true, position=2) +@ActionReference(path = "Menu/Window", position = 334) +@TopComponent.OpenActionRegistration(displayName = "#CTL_BlueskyGephiMainPanel", + preferredID = "BlueskyGephiMainPanel") public class BlueskyGephiMainPanel extends TopComponent { protected static final Logger consoleLogger = Logger.getLogger(BlueskyGephiMainPanel.class.getName()); - private final BlueskyGephi blueskyGephi; + private static final Logger logger = Logger.getLogger(BlueskyGephiMainPanel.class.getName()); + private BlueskyGephi blueskyGephi; /** * Creates new form BlueskyGephiMainPanel */ public BlueskyGephiMainPanel() { initComponents(); - blueskyGephi = Lookup.getDefault().lookup(BlueskyGephi.class); + setName(NbBundle.getMessage(BlueskyGephiMainPanel.class, "CTL_BlueskyGephiMainPanel")); + setToolTipText(NbBundle.getMessage(BlueskyGephiMainPanel.class, "HINT_BlueskyGephiMainPanel")); + blueskyGephi = Lookup.getDefault().lookup(BlueskyGephi.class); + if (blueskyGephi == null) { + logger.warning("BlueskyGephi service not available"); + return; + } credentialsHostField.setText(blueskyGephi.getHost()); credentialsHandleField.setText(blueskyGephi.getHandle()); credentialsPasswordField.setText(blueskyGephi.getPassword()); diff --git a/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties b/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties index 605ccce43..402c71289 100644 --- a/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties +++ b/modules/BlueskyGephi/src/main/resources/fr/totetmatt/blueskygephi/Bundle.properties @@ -1,3 +1,5 @@ +CTL_BlueskyGephiMainPanel=Bluesky Gephi +HINT_BlueskyGephiMainPanel=Import network from Bluesky / AtProtocol BlueskyGephiMainPanel.toolTipText=Bluesky Gephi BlueskyGephiMainPanel.Credentials.toolTipText=Credentials BlueskyGephiMainPanel.credentialsPanel.border.title=Credentials