예제 #1
0
	try:
		IJ.getClassLoader().loadClass(name)
		return True
	except ClassNotFoundException:
		return False
	except NoClassDefFoundError:
		return False

# Inspect each menu command
for it in Menus.getCommands().entrySet().iterator():
	name = it.value
	paren = name.find('(')
	if -1 != paren:
		name = name[:paren]

	if not doesClassExist(name):
		# Try without the first package name, since it may be fake
		# for plugins in subfolders of the plugins directory:
		dot = name.find('.')
		if -1 == dot or not doesClassExist(name[dot+1:]):
			print 'ERROR: Class not found for menu command:', \
				it.key, '=>', it.value, \
				'in:', Menus.getJarFileForMenuEntry(it.key)
			ok = 0

if ok:
	print "ok - Menu commands all correct."
	sys.exit(0)

sys.exit(1)
예제 #2
0
파일: plugin_jars.py 프로젝트: scifiss/fiji
        IJ.getClassLoader().loadClass(name)
        return True
    except ClassNotFoundException:
        return False
    except NoClassDefFoundError:
        return False


# Inspect each menu command
for it in Menus.getCommands().entrySet().iterator():
    name = it.value
    paren = name.find('(')
    if -1 != paren:
        name = name[:paren]

    if not doesClassExist(name):
        # Try without the first package name, since it may be fake
        # for plugins in subfolders of the plugins directory:
        dot = name.find('.')
        if -1 == dot or not doesClassExist(name[dot + 1:]):
            print 'ERROR: Class not found for menu command:', \
             it.key, '=>', it.value, \
             'in:', Menus.getJarFileForMenuEntry(it.key)
            ok = 0

if ok:
    print "ok - Menu commands all correct."
    sys.exit(0)

sys.exit(1)