Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [pde-dev] Plug-in Dependency Problem

Hi vaishali,
I think you need to change how you do to access from A-B / B - A. I have worked in eclipse for writing a product I am telling my experience, its fine to us. here is the process of accessing one plugin from other.

Each plugin class that u write - say some name XYZPlugin.java will expose one public static method to get the instance of the plugin. getDefault(). so when ever you need XYZPlugin, from other code, you have to call XYZPlugin.getDefault() will give the instance of the plugin, this is the way you should access the plugin other wise, it will raise class loading problem ( we faced this when we set the class path kind of stuff).

class XYXPlugin {

// this will be written by eclipse itself no need to write this method when u create plugin. public XXXXXX static getDefault() { //where XXXXXX the class will differ based on plugin u use
  return xyzPlugin;
 }
 // consider u want to perform this proces fro mdiff. plugin.1
 public void doSomeProcess() {

 }
}

class ABCPlugin {

 public void accessProcess() {
    XYZPlugin aplugin = XYZPlugin.getDefault();
    aplugin.doSomeProcess(); // thats all its done.
 }
}

if u have still problems, mail a line in reply.

Pradheep
----Original Message Follows----
From: Vaishali De <vde@xxxxxxxx>
Reply-To: pde-dev@xxxxxxxxxxx
To: pde-dev@xxxxxxxxxxx
Subject: [pde-dev] Plug-in Dependency Problem
Date: Thu, 18 Mar 2004 09:25:21 -0600
MIME-Version: 1.0
Received: from mc3-f33.hotmail.com ([64.4.50.169]) by mc3-s18.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 18 Mar 2004 07:31:22 -0800 Received: from dev.eclipse.org ([204.138.98.15]) by mc3-f33.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Thu, 18 Mar 2004 07:30:16 -0800 Received: from dev.eclipse.org (localhost.localdomain [127.0.0.1])by dev.eclipse.org (Postfix) with ESMTPid 0781E240AB; Thu, 18 Mar 2004 10:30:01 -0500 (EST) Received: from expms3.cites.uiuc.edu (unknown [128.174.5.207])by dev.eclipse.org (Postfix) with ESMTP id A411D240A5for <pde-dev@xxxxxxxxxxx>; Thu, 18 Mar 2004 10:25:13 -0500 (EST) Received: from expms3.cites.uiuc.edu (localhost.cites.uiuc.edu [127.0.0.1])by expms3.cites.uiuc.edu (Mirapoint Messaging Server MOS 3.3.7-GR)with ESMTP id ANX94398;Thu, 18 Mar 2004 09:25:21 -0600 (CST) Received: from 128.174.5.212by expms3.cites.uiuc.edu (Mirapoint Messaging Server MOS 3.3.7-GR)with HTTP/1.1;Thu, 18 Mar 2004 09:25:21 -0600
X-Message-Info: N4u0pqWW+O087J9UM0tuOuTMq8e+/1pZKY7kXHiHYM0=
Delivered-To: pde-dev@xxxxxxxxxxx
X-Mailer: Webmail Mirapoint Direct 3.3.7-GR
Message-Id: <70014e65.230ebee8.817d500@xxxxxxxxxxxxxxxxxxxxx>
Errors-To: pde-dev-admin@xxxxxxxxxxx
X-BeenThere: pde-dev@xxxxxxxxxxx
X-Mailman-Version: 2.0.13
Precedence: bulk
X-Reply-To: vde@xxxxxxxx
List-Unsubscribe: <http://dev.eclipse.org/mailman/listinfo/pde-dev>,<mailto:pde-dev-request@xxxxxxxxxxx?subject=unsubscribe>
List-Id: Eclipse PDE general developers list. <pde-dev.eclipse.org>
List-Post: <mailto:pde-dev@xxxxxxxxxxx>
List-Help: <mailto:pde-dev-request@xxxxxxxxxxx?subject=help>
List-Subscribe: <http://dev.eclipse.org/mailman/listinfo/pde-dev>,<mailto:pde-dev-request@xxxxxxxxxxx?subject=subscribe>
List-Archive: <http://dev.eclipse.org/pipermail/pde-dev/>
Return-Path: pde-dev-admin@xxxxxxxxxxx
X-OriginalArrivalTime: 18 Mar 2004 15:30:18.0085 (UTC) FILETIME=[EAEC9950:01C40CFD]

Hello,

I am a computer science graduate student at UIUC, working with Prof. Ralph Johnson on an IBM project; we are building an IDE for fortran.

I ran across a problem related to plug-in dependencies and was hoping someone might know what I need to be doing about it.

Consider 2 plug-ins A and B. I need to call code in plug-in B from plug-in A. So I added plug-in B to the "Dependencies" in plug-in A's plugin.xml file. That worked fine, and I am able to access code as required. However, now I need to call code in plug-in A from plug-in B. When I tried to add plug-in A to plug-in B's "Dependencies", I got a compile-time error that said "A cycle was detected in the classpath of project: <name of project in plug-in A>"

I had added plug-in B to the classpath (and Java Build Path in the Properties of the project) of plug-in A so that I could access code from there in plug-in A.

Does anyone know how I can have this two-way dependency relationship between plug-ins?

-Vaishali
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/pde-dev

_________________________________________________________________
Join BharatMatrimony.com. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?72 Unmarried? Join Free.



Back to the top